Skip Query Parameter

M

M.A.Halim

Dear All
I Have a combo box that is feeding a query parameter to filter some rows.
sometimes I want to view all records.
the row source for this combo box is a table assigned only for that. and I
want to add this option to be displayed in the combo box "View All". So I
will add a new record in that table that will have the value of "View All"
then the filter will not work. how can i solve it ?
The data type in this combo box is "text". and I have similar case for
"Date" Data type in text box.
Thanks
 
W

Wolfgang Kais

Dear "M.A.Halim".

M.A.Halim said:
I Have a combo box that is feeding a query parameter to filter
some rows. Sometimes I want to view all records.
The row source for this combo box is a table assigned only for
that. And I want to add this option to be displayed in the combo
box "View All". So I will add a new record in that table that will
have the value of "View All" then the filter will not work.
How can i solve it ?

If a value other than "View all" is selected, only records containing
that entry will be displayed, otherwise all records have to be shown.
So when will a record with a certain value in the filter field be
dislayed?
- When that value or "View All" is selected in the combo box.
Therefore, the criteria for the query should be something like this:
Where FilterField = Forms!FormWithComboBox!TheComboBox
Or Forms!FormWithComboBox!TheComboBox = "View All".
In query design grid, you can add a new calculated column containing
the value of the ComboBox (I guess that you already used that value
as criterion for the field you use to filter the records) and use
the criterion "View All" in a row with the "Or" heading.
 

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