Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding text boxes 1

Status
Not open for further replies.

zyphac

Technical User
Mar 12, 2003
47
US
I have several boxes in which I will be placing a value. Then the total text box. EX:

=([amnt]+[amnt1]+[amnt2]+[amnt3]+[amnt4]+[amnt5]+[amnt6])

Here is the problem: I will not always be entering values in all of them. This only work if I enter a value in all of the boxes. How can I rework this line?
Thanks zypha : )
 
The reason it doesn't work is that the fields you didn't enter data into have the value Null, which can't be used in arithmetic. To convert the Null values into zeros, use the Nz() function. For example,
Nz([amnt], 0)
evaluates to 0 if [amnt] is Null, otherwise it evaluates to [amnt]. Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Ahhh, that works like a charm!!! Thanks. Also in my total text box after you input all your values, you have to click on the total text box to get the total, is there away for it to just show the toatal value with out clicking on the text box ?

Thank you very much!!!!zypha
 
Disregaurd the last statement I figured it out, Thanks again!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top