iif for criteria

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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],"*")
 
Back
Top