iif statement and decimal points

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I've got a query which calculates the concentration of CO2 in a solution
based on sample size and amount of acid used to titrate the sample.

I use -1 values in my tables to signify when the value is out of range of
the instrument (I can still use the analysis, but I need to report it as the
detection limit).

In my query I use an iif statement to pull the two values together:
CO2Report: IIf([CO2_total]>0,[CO2_total],">detection limit"). The expected
values are between 0 and ~5

This works beautifully except when CO2_total is less then 0.1. Access then
reports CO2_total*100, i.e, 0.032 mmol is reported as ~3.2

Why does it do this? How do I fix it?

Cheers

Susan
 
Temporarily add the unchanged original value (ie. CO2_total) to the
query. I think you will find that the value is not what you think it
is. There's no way Access will multiply by 100 unless you have asked it
to (somehow).

Also, what is the type of the database field?

HTH,
TC (MVP Access)
http://tc2.atspace.com
 
Hello!

Thanks!!! I just wrote an response to your questions and pasted the output
to the table to this post. The output of CO2Report is being experessed in
scientific output (i.e. it's not 0.032 but is actually 3.2(lots of decimal
points)10^2).

The output of the iif statement is always in tect format

So I guess the question now is how do you show a text-number with a limited
decimal points or change it's format???

Thanks
Susan
 
Back
Top