change a report property if * used in query parameter

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?
 
S

Stan

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

Allen Browne

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top