View Full Version : Query criteria parameter from form list values


bmohabi
11-12-2009, 09:57 AM
Hi

Would highly appreciate if someone please help me resolve this.

I have a query that uses unbound text list box on a form as criteria. The box has 4 values:

(Blank)
All*
Requested
Confirmed

* Not listed in the original table. Added for user convenience. So when user selects all it should show blank, requested and confirmed.

However Only requested / confirmed works. If I do not select any value or select "All" or "(Blank)"the query does not return any result.

I am using the following parameters in the query criteria:

[Status]=IIf(Eval("[Forms]![Report]![Status].Column(0)")='All',Null,Eval("[Forms]![Report]![Status].Column(0)"))

Your suggestion would be greatly appreciated.

Thanks.
Bmohabi

John Big Booty
11-12-2009, 02:41 PM
Check this link (http://www.databasedev.co.uk/blank_query_parameter.html). Attached is a sample, for a practical example, check out the structure of Query 1.