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

simple Query calculation - but strange behaviour

Status
Not open for further replies.

usfpjc

MIS
Jan 1, 2002
27
0
0
US
I have four fields that contain information regarding invoice totals, and one field with labor costs.
Query:

the formula is as follows: Total Cost:([total1]+[total2]+[total3]+[total4]+[labor cost])

I have designed a form based on this query, but the strange behaviour is that if I only enter data for the total1, total1 and labor cost, the Total cost field does not shows any results.

If I input data for all the fields (total1..total4), then total cost shows the calculation without any problem.

What could be happening ?
 
Try
Total Cost:(Nv([total1])+Nv([total2])+Nv([total3])+Nv([total4])+Nv([labor cost]))

It should make all null values = 0, assuming they are of number type in the first place.

rgds
Andy
 
? Nv ?

Should be Nz



MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
D'Oh. You're quite right. It was late, I was tired. I'd like to say that some joker had swapped the keys, but it would be a lie. So please accept my apology for this error.

Still, I assume it was enough of a clue as usfpjc didn't respond.

Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top