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

calculating totals for a report 1

Status
Not open for further replies.

dotolee

Technical User
Jan 27, 2008
134
CA
I have a bunch of textboxes that i need to tally up. My problem is that sometimes, the text boxes will be empty.
so far, i have the following code in my "total score" textbox

=CInt([txt1].[Value])+CInt([txt2].[Value])+CInt([txt3].[Value])

what's the best way to also check for a null? if it's null, i don't want to attempt to add it. Right now i get "Error in my total score for any record that has a null

thx
 
Have a look at the NZ function as in
Code:
CInt([red]NZ([/red][txt1].[Value][red],"0")[/red]) ...etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top