View Full Version : Parameter query


Nata
04-15-2001, 05:41 PM
Hi
I have a parameter query, that asks for criteria for 5 fields. But I want it so that if one parameter is left blank, then the field is not queried, and only the ones where the user enters criteria are queried on.
This can be done in a regular query, just don't enter criteria for the field, but I tried doing same for parameter, and 2 days later it still doesn't work.

Here's my latest "invention"
(I put it in the CRITERIA line of the query)

IIf([Forms]![A Test Dialog]![Skills] Is Null,[Skills]is null,[Skills] Like "*" & [Forms]![A Test Dialog]![Skills] & "* ")

should i mention it didn't work

R. Hicks
04-15-2001, 06:40 PM
Just use the following as an example in the Criteria section of the QBE grid of your query:

Like [Forms]![A Test Dialog]![Skills] & "*"

If "Skills" is left empty (Null) then the query will ingore the entry and assume the "*" to show "all" for this field.

Just use the example above for all entries you want to leave as an empty (Null) choice.

HTH
RDH

[This message has been edited by R. Hicks (edited 04-15-2001).]