addition in text boxes

G

Guest

I have three text boxes Qty1, Qty2 and Qty3.

I used the following expression to calculate (add) the values in the text
boxes

=[Qty1]+[Qty2]+[Qty3]

But they don't add up they just have each individual number in the total
text box.
 
D

Douglas J. Steele

Sounds as though they're bsing treated as text.

Try:

=CLng(Nz([Qty1], 0)+CLng(Nz([Qty2], 0))+CLng(Nz([Qty3], 0))
 
G

Guest

Hi Doug

Thanks for the help but this is still not calculating. With the expression u
recommended nothing is appearing in the text box.

--
Thank you for your help


Douglas J. Steele said:
Sounds as though they're bsing treated as text.

Try:

=CLng(Nz([Qty1], 0)+CLng(Nz([Qty2], 0))+CLng(Nz([Qty3], 0))

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Kirt84 said:
I have three text boxes Qty1, Qty2 and Qty3.

I used the following expression to calculate (add) the values in the text
boxes

=[Qty1]+[Qty2]+[Qty3]

But they don't add up they just have each individual number in the total
text box.
 
D

Douglas J. Steele

What are [Qty1], [Qty2] and [Qty3]? If they're controls on the form, try use
Me![Qty1] (etc.) instead.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Kirt84 said:
Hi Doug

Thanks for the help but this is still not calculating. With the expression
u
recommended nothing is appearing in the text box.

--
Thank you for your help


Douglas J. Steele said:
Sounds as though they're bsing treated as text.

Try:

=CLng(Nz([Qty1], 0)+CLng(Nz([Qty2], 0))+CLng(Nz([Qty3], 0))

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Kirt84 said:
I have three text boxes Qty1, Qty2 and Qty3.

I used the following expression to calculate (add) the values in the
text
boxes

=[Qty1]+[Qty2]+[Qty3]

But they don't add up they just have each individual number in the
total
text box.
 
G

Guest

They're unbound controls
--
Thank you for your help


Douglas J. Steele said:
What are [Qty1], [Qty2] and [Qty3]? If they're controls on the form, try use
Me![Qty1] (etc.) instead.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Kirt84 said:
Hi Doug

Thanks for the help but this is still not calculating. With the expression
u
recommended nothing is appearing in the text box.

--
Thank you for your help


Douglas J. Steele said:
Sounds as though they're bsing treated as text.

Try:

=CLng(Nz([Qty1], 0)+CLng(Nz([Qty2], 0))+CLng(Nz([Qty3], 0))

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I have three text boxes Qty1, Qty2 and Qty3.

I used the following expression to calculate (add) the values in the
text
boxes

=[Qty1]+[Qty2]+[Qty3]

But they don't add up they just have each individual number in the
total
text box.
 

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