Wildcard in dropdowns in parameter queries

S

SFC Traver

Read the discussion on using combo boxes to select records for a report.
Works great! (That's why I love this discussion group!) I have seen it done
on other access databases and was wondering how to do this. I have everything
working when I select a work area for a report. What I want to do is also
make available "All Work Areas". Have tried various wild card characters in
the table, but nothing works. How do I do this?
Thanks!
SFC Traver
 
F

fredg

Read the discussion on using combo boxes to select records for a report.
Works great! (That's why I love this discussion group!) I have seen it done
on other access databases and was wondering how to do this. I have everything
working when I select a work area for a report. What I want to do is also
make available "All Work Areas". Have tried various wild card characters in
the table, but nothing works. How do I do this?
Thanks!
SFC Traver

First add "All" to the drop down list.
As Combo box Rowsource:

Select tblWorkAreas.Location From tblWorkAreas Union Select ('<ALL>')
from tblWorkAreas Order by Location;

Then change the query criteria to:

Like
IIf([forms]![FormName]![ComboName]="<ALL>","*",[forms]![FormName]![ComboName)

Change the table and field names to your actual table and field names.
The form must be open when the query/report is run.
 
Top