My query seems to be playing up, and I'm not entirely sure why at the moment. Can anyone shed any light on this matter?
I have a query which is constructed from a table containing the following fields:
The third item (Calc %w/w) is the following:
Calc %w/w: IIf(Nz([%w/w],0)=0,IIf(IsNumeric([Assay (mg/ml)]),round(([Assay (mg/ml)]/11.86),3),"N/A"),[%w/w])
So basically:
If (%w/w = null or %w/w = "") then
if the assay is a number then
divide by 11.86 and round to 3dps
otherwise display "N/A"
otherwise display the value entered into %w/w
The problem seems to be with the division and rounding.
If I put the following statement in instead it performs the task well (aside from the fact that it isn't doing the division and isn't rounding), and displays "N/A" if the Assay field is non-numeric or if it is "".
Calc %w/w: IIf(Nz([%w/w],0)<>0,[%w/w],IIf(IsNumeric([Assay (mg/ml)]),[Assay (mg/ml)],"N/A"))
However, as soon as I put the division or rounding in, instead of displaying "N/A", it displays "#Error" instead.
Any clues?
I have a query which is constructed from a table containing the following fields:
- %w/w
- Assay (mg/ml)
- Calc %w/w
The third item (Calc %w/w) is the following:
Calc %w/w: IIf(Nz([%w/w],0)=0,IIf(IsNumeric([Assay (mg/ml)]),round(([Assay (mg/ml)]/11.86),3),"N/A"),[%w/w])
So basically:
If (%w/w = null or %w/w = "") then
if the assay is a number then
divide by 11.86 and round to 3dps
otherwise display "N/A"
otherwise display the value entered into %w/w
The problem seems to be with the division and rounding.
If I put the following statement in instead it performs the task well (aside from the fact that it isn't doing the division and isn't rounding), and displays "N/A" if the Assay field is non-numeric or if it is "".
Calc %w/w: IIf(Nz([%w/w],0)<>0,[%w/w],IIf(IsNumeric([Assay (mg/ml)]),[Assay (mg/ml)],"N/A"))
However, as soon as I put the division or rounding in, instead of displaying "N/A", it displays "#Error" instead.
Any clues?