Addition Function in Query

buddyleee5

Registered User.
Local time
Today, 13:04
Joined
Nov 17, 2011
Messages
19
I created a query with 3 separate multiplication totals (Hours * Hourly Rate) and then I have a query total (Total1+total2+total3) and it works fine when there is data that has been entered into all 3 totals, but if one of them is blank it does not show a sum- is there a way to fix this to show a total even if 2 of the 3 fields are blank?

Thanks in advance
 
Check out the VBA.Nz() function, which returns a value you specify when it encounters a null value.
 
This did exactly what I wanted it to do, the only issue I have now is formatting the total that it displays- how do I go about doing that? The 3 totals that it is summing are all currency and I would like this to also be a currency cell.
 
Maybe...
Code:
CCur(Nz(Field1, 0) + Nz(Field2, 0)) As Total
Cheers,
 

Users who are viewing this thread

Back
Top Bottom