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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

All Records or User Specific Input

Status
Not open for further replies.

dabowles

MIS
Jun 26, 2001
64
US
By using a user-defined variable, [Enter X Data], in an Access query, how can you make the query display all records if the user enters no criteria? I've tried an IIf statement like IIf(IsNull([Enter X Data]), "Like *", [Enter X Data]), but that didn't work either.

Thanks in advance,

David B.
 
Lilliabeth,

I used your suggestion and plugged it into:

IIf(IsNull([Enter]),"Like *" & [Enter] & "*",[Enter]),

but that did not work either way. If I entered a criteria it returned no records or if I left it blank it returned no records, any other suggestions?

Thanks,

David B.
 
=[Enter x Data] Or [Enter x Data] 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
 
Lilliabeth,

I used your suggestion only without the inline If and it worked like a charm thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top