Query with a condition ???

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

Guest

Hi,

I have access 2002 and I want to know if ther a way to make a query with a
condition. I have a field(currency) and if the value is 0 (0$), in the query
i want to return a blank or null value. is there a way to do that.
 
Do you really need that value, or is this just a display requirement?

If it's just a display issue, you can use the Format property of a control
to dictate that you want a Null value for the zero result:
$#,##0.00;-$#,##0.00;Null;Null

If it's a value issue, the query would be similar to this generic result:

SELECT IIf(MyFieldName = 0, Null, MyFieldName)
FROM MyTableName;
 

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

Back
Top