Problem Adding Fields in a Form

JGravesNBS

Registered User.
Local time
Today, 11:54
Joined
Apr 5, 2014
Messages
58
TC is a unbound Combo Box, when operator enters TC the Description and Amount is pulled from the Combo Box into unbound fields as follows:

TC Description Amount
42 Hats 8
32 Pins 5

Total 85

Total=nz([trans code2 amt])+nz([trans code3 amt])

My Total should be 13

Why is Total concatenating the values 8 and 5?

Amount are Total are unbound Currency 2
 
Try

Total=nz([trans code2 amt],0)+nz([trans code3 amt],0)

If that doesn't work wrap each in CInt() or the appropriate type.
 
This worked

Total=nz([trans code2 amt],0)+nz([trans code3 amt],0)

Thank you
 
No problem. I think the default for the Nz() function is a ZLS, which would have led to your problem.
 

Users who are viewing this thread

Back
Top Bottom