Solved Adding field values in VBA (1 Viewer)

ClaraBarton

Registered User.
Local time
Today, 07:54
Joined
Oct 14, 2019
Messages
479
Code:
Do While intLane < Me.[StartLane] + Me.[NoOfLanes] + 1
StartLane = 41
NoOfLanes = 3
Wanted answer = 44
Returned answer = 414

How do I return field values instead of text?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 07:54
Joined
Aug 30, 2003
Messages
36,127
Sounds like StartLane (at least) is being seen as text. Either fix it in the source table, format the textbox, or wrap the reference in CInt() or the appropriate conversion function.
 

ClaraBarton

Registered User.
Local time
Today, 07:54
Joined
Oct 14, 2019
Messages
479
it's not a field just a form box. ... Oh rats! of course it's in the format. I apologize.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 07:54
Joined
Aug 30, 2003
Messages
36,127
No worries, does that mean it's working now?
 

ClaraBarton

Registered User.
Local time
Today, 07:54
Joined
Oct 14, 2019
Messages
479
Yes, it is working. I just needed to set to general number in format and I was looking at the data tab instead. Thank you.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 07:54
Joined
Aug 30, 2003
Messages
36,127
Happy to help!
 

Users who are viewing this thread

Top Bottom