Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If form field is null, query returns all records 1

Status
Not open for further replies.

ropledople

IS-IT--Management
Mar 30, 2005
6
US
Hi,

I am trying to build a form that runs a query. The user has the ability to enter values into the form using combo boxes. However, I don't want to require the user to fill in all of the boxes if they don't want to. If they choose not to select a particular option, I want the query to return all records in that field. Here is what I have tried so far:

in the query criteria box for a given field:

IIf([forms]![frm_targetratelookup_main]![cmb_eqtype] Is Null,"*",[forms]![frm_targetratelookup_main]![cmb_eqtype])

I think i am close, but i need to know what to put in place of the "*" to get the query to return all values.

Thanks!

 
=[Forms]![frm_targetratelookup_main]![cmb_eqtype] OR [Forms]![frm_targetratelookup_main]![cmb_eqtype] Is Null


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top