Question : Total text box value in ms access form

I have an access form which has 6 text boxes.  I wanted the value of one of the 6th text box to equal the sum of the others.  I'd like the "total sum" text box (the 6th one) to change totals when I changed the value in one of the other 5 text boxes.

Answer : Total text box value in ms access form

Its simply treating them as text. + is considered a valid concatenation operator in Access when the fields in question are text. Using VAL() will convert these text fields to their numeric value and allow addition.

=val(nz([txtBox1Name],0)) + val(nz([txtBox2Name])) + val(nz([txtBox3Name])) + val(nz([txtBox4Name])) + val(nz([txtBox5Name]))

J
Random Solutions  
 
programming4us programming4us