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
 
Back
Top