Returning #N/A if null value

A

Adam

Hello!

How do I create a query that returns #N/A when the value
is null? I am currently using this in line if statement:

PSI: IIf(IsNull([tblPSI.Pressure]),"#N/A",
[tblPSI.Pressure])

However, by using this iif statement, my numeric values
are changed to text. How do I get my query to return #N/A
when null, but keep my numeric values numeric if not?

Thanks for the help!
 
J

John Vinson

How do I get my query to return #N/A
when null, but keep my numeric values numeric if not?

Set a Format property on the field of

#;-#;"0";"#N/A"

The four portions of the format control the display of positive,
negative, zero and NULL values respectively.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top