change a report property if * used in query parameter

  • Thread starter Thread starter Stan
  • Start date Start date
S

Stan

In this where claus if the user types * for the parameter [Time Period] the
report that uses it displayes the first record field value in the
corresponding text box. I want to substitute that value for something like
all. how can I do this?
 
The where statement is
WHERE (((Survey1.DaySegment) Like UCase([Time Period])) AND ((Survey1.[Date
Surveyed]) Between [DateStart] And [DateEnd]))
 
The most flexible solution is to omit the parameters from the query, and
instead build a WhereCondition from only the boxes on a form where the user
enters something.

Details in:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html

The article contains a sample database you can download and see how it
works. The sample filters a form, but the technique of building the filter
string is identical for filtering a report.

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

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

Stan said:
The where statement is
WHERE (((Survey1.DaySegment) Like UCase([Time Period])) AND
((Survey1.[Date
Surveyed]) Between [DateStart] And [DateEnd]))

Stan said:
In this where claus if the user types * for the parameter [Time Period]
the
report that uses it displayes the first record field value in the
corresponding text box. I want to substitute that value for something
like
all. how can I do this?
 
Back
Top