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

using a blank value in a custom calulated query field

Status
Not open for further replies.

Tessadear

Technical User
Mar 7, 2006
26
BB
I am using a custom calculated field in a query. the calculation adds an amount of money from each linked table. My problem is that the calculation (total) only displays if a value is entered as data in each table, if cell is left blank the calculation does not display. I need to make the calculated total display whether or not some data values are blank. for example

Total:[money1]+[money2]+[money3]
if there is a value in every field then the total is displayed correctly, if money2 is blank the total does not display.
Is there a way I can make my calculated total display even if some values are blank?
 
You may try this:
Total:Val([money1] & "")+Val([money2] & "")+Val([money3] & "")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
. . . or:
Code:
[blue]Total:Nz([money1],0)+Nz([money2],0)+Nz([money3],0)[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top