Calculation not right

A

A Hopper

On an unbound form I have three text boxes (Text254,
Text256, Text258). In the On Click event of Text258 is the
following:
Me.Text258 = Nz(Me.Text254) + Nz(Me.Text256)

When I enter 50 in Text254 and Text256 and click on
Text258 I get the answer of 5050 not 100.

Hope someone can help.

Allan
 
C

Cheryl Fischer

Hello Alan,

Looks like the + sign is concatenating two text fields. Perhaps this would
work:

me.Text258 = Val(Nz(Me.Text254)) + Val(Nz(Me.Text256))

hth,
 
C

Cheryl Fischer

Hello Alan,

Looks like the + sign is concatenating two text fields. Perhaps this would
work:

me.Text258 = Val(Nz(Me.Text254)) + Val(Nz(Me.Text256))

hth,
 
C

Clay

Check the text boxes and make sure they are set to accept
a number, not a text. This could be your problem.
 
C

Clay

Check the text boxes and make sure they are set to accept
a number, not a text. This could be your problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top