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

Report - Column Totals 2

Status
Not open for further replies.

sanders720

Programmer
Aug 2, 2001
421
US
I have eight columns in a report, each in a txtBox wirl a specific name. I would like to add the values of numbers in the first seven and place the results in the eighth.

I am thinking of somehow using the expression builder with control source, however some fields are blank and will not allow me to do simple addition.

Please help if you can, and thank you!
 
you can use
...+ blah + nz([Field]) + blah + ...

nz converts a null to zero

if that doesn't work, do

...+ blah + iif([Field] is null,0,[Field]) + blah + ...
 
Ginger's suggestion is good, but do your calculations in the query such as:

MySum: [Blah1] + [Blah2] + [Blah3]

Then, in the report, select MySum as your text box's control source. Much faster and a whole lot easier.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top