null function in criteria

  • Thread starter Thread starter JeffMKlein
  • Start date Start date
J

JeffMKlein

I am using a function (fClientName) in the criteria of my query. Is there a
way to show all records if this function is "" or null?
eg: If nothing is selected then all records show.
 
Dear Jeff:

In a criterion of the query, test the function's result. Since the function
may return "" or NULL, you can test both, with OR between:

(fClientName() = "" OR fClientName() IS NULL)

I put this in parens in case you have other criteria.

If you wish, use:

Nz(fClientName(), "") = ""

The Nz function changes NULL into whatever you choose, in this case "".

Tom Ellison
 
hi jeff,

u can also use IsNull(fClientName() ) in ur query

thanks
sunil.t
 

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