Adding text boxes

T

thusnani

Im trying to add
txtBox1 + txtBox2 + txtBox3 + txtBox4 + txtBox5 + txtBox6 + txtBox7 +
txtBox8 + txtBox9 + txtBox10 = txtBoxTotal
Now im to write some code so everytime i enter a number into a text box

it will give me a running total in txtBoxTotal. What i'm having
problems with is when the rest are null i get errors and the total
doesnt come up in the bottom.
Please let me know if anyone can help.
Thanks
 
R

Rick B

=Nz([txtBox1],0) +Nz([ txtBox2],0) + Nz([txtBox3],0) + Nz([txtBox4],0)
+Nz([ txtBox5],0) + Nz([txtBox6],0) + Nz([txtBox7],0) + Nz([ txtBox8],0) +
Nz([txtBox9],0) + Nz([txtBox10],0)
 
R

Ron2006

Check the help area on the Nz function

txtboxtotal = nz(txtbox1,0) + nz(txtbox2,0) + etc
 
S

SSG QuarterMaster

If I understand this correctly your running total comes up null when you
enter a value say into text box1 and the rest are null. If these entries are
new entries into a table try setting the default value setting to a zero.
 

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