Hi
I have a query which includes a calculated field as follows:
Free Stock: Nz([Total Stock],0)-Nz([SumOfKg],0)
In some cases this returns a negative number and I would like this changed to a zero.
I have tried the following in the criteria
IIf(Nz([Total Stock],0)-Nz([SumOfKg],0)>0,Nz([Total Stock],0)-Nz([SumOfKg],0),0)
however when I run the query the lines are just missed out rather than it being there with a zero.
Can anyone help please?
Thank you
I have a query which includes a calculated field as follows:
Free Stock: Nz([Total Stock],0)-Nz([SumOfKg],0)
In some cases this returns a negative number and I would like this changed to a zero.
I have tried the following in the criteria
IIf(Nz([Total Stock],0)-Nz([SumOfKg],0)>0,Nz([Total Stock],0)-Nz([SumOfKg],0),0)
however when I run the query the lines are just missed out rather than it being there with a zero.
Can anyone help please?
Thank you