iif for criteria

G

Guest

I have a query that gains criteria for a field from a unbound combo box in a
form. I have put IIf(IsNull([forms]![getpractitioner]![combo47]),"Like
*.033",[forms]![getpractitioner]![combo47]) in the criteria part of a field
with the goal that if the user does not make a selection from the combo box
the report will list all records meeting other criteria given to it. The
above if true section does not pull all records it pulls no records. I have
tried "*.033", Null, "Like '*.033'", and none of these do it. If the combo
box value is null then there really does not need to be criteria but am not
sure how to make the iif function to pass nothing to the criteria.
 
S

Steve Schapel

Seeker,

An IIf() function won't work in this circumstance. Here are two
possible aproaches...

[Forms]![getpractitioner]![combo47] Or
[Forms]![getpractitioner]![combo47] Is Null

Like Nz([Forms]![getpractitioner]![combo47],"*")
 

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