getting all if parameter not selected

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query that is behind a report. In the query designer there is a way
to indicate if nothing is selected from the parameter, all records will be
returned. It has been a long time since working on this that I have
forgotten what is added. If anyone is familiar with what is used, I can use
the help.
Thanks for the response and help.
.... John
 
Actually, Dennis, that won't do it.
Any rows where the field is null (nothing there) will not be returned.

A workaround is to change the WHERE clause of the query like this:
WHERE ([Enter Data] & "" = "") OR ([Field2] = [Enter Data])

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Dennis said:
Like "*" & [Enter data] & "*"

JohnE said:
I have a query that is behind a report. In the query designer there is a
way
to indicate if nothing is selected from the parameter, all records will
be
returned. It has been a long time since working on this that I have
forgotten what is added. If anyone is familiar with what is used, I can
use
the help.
Thanks for the response and help.
... John
 
If the query is the record source for a report, I would sugges removing the
criteria from the query and use the Where argument of the OpenReport method
to provide the filtering.
 
Back
Top