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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum it up

Status
Not open for further replies.
Joined
May 31, 2000
Messages
34
Location
US
I have 5 fields on a form (Number_1 - 5) I would like to get a sum of these fields. I did the Number_1 + Number_2 method, and that works if all of the fields have numbers but if one of the fields is missing a value an error appears in the Total field. What is a better way to do this?
 
Just a thought:&nbsp;&nbsp;Have all your fields set to an initial value of '0' ...&nbsp;&nbsp;And when they hit the sum button, or when they leave the field, check it for a zero or other valid numeric entry.<br><br>Change any alpha entry to zero with a pop-up message notifying the user; and you should be able to avoid the error.<br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top