Query Multiplication Problem.

jeday_jey

New member
Local time
Yesterday, 16:08
Joined
Nov 8, 2007
Messages
4
Hi Folks.

I have a question about query. There is two field in query.Total and Currency. I'd like to multiplication total and currency filelds.I so thing do in query. if currency field is empty , write total to the GTotal.if you help to me I would be very glad.

Thank you

For Example
GTotal:[Total]*[Currency] it is very good working. but I don't want this calculation
GTotal:iif([Currency]is not null;[Total]*[Currency] or iif([Currency] is null; [Total]) it is not working. Query result : -1 :confused:

Total Currency GTotal
10 * 1.2 = 12
20 * = 20 like.....
 
Try this one:

Iif(IsNull([Total];1);[Total])*Iif(IsNull([Currency];1);[Currency])
 
Or, what about this one:

GTotal:Nz([Total],0)*Nz([Currency],0)
 
That one is even better, just think about using 0 or 1 in formula. You could get wrong result.
 

Users who are viewing this thread

Back
Top Bottom