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

parameter query; showing all

Status
Not open for further replies.

trustsun

Technical User
Feb 4, 2004
73
US
How could I still show all the records if I leave the parameter box blank when I run a report from a query?

thanks
 
Provided the searched field is text, you may consider change the criteria from:
[Enter parameter]
to something like this:
Like Iif(Len(Trim([Enter parameter]))=0,"*",[Enter parameter])

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
oops forgot to mention, these are dates values would this help with your suggestion.
 
Ah, it's a date parameter.
So, don't change the criteria, but in the Or row you may put something like this:
Len(Trim(CStr([Enter parameter])))=0

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
oops I did it again,
my fields are like, mm/dd/yy hh:mm:ss
your last suggestion gave me an error or "0" when I put dates in the parameter.
hope you can still help?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top