Filter Combo Box / List Box for All Records

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

Guest

I may be going down the wrong route here but I would like a user to use a
form to select multiple filters and then have it execute. I have combo box's
but my users may ask for e.g all contracts instead of just one or multiple
but not all contracts.
There are other filters i would like to add but this would be a starter for 10


thanks
 
See:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html
The article explains how to design a filter so users just leave a box blank
if they don't want to filter on that field.

If they want to select multiple contracts, you will need to incorporate a
multi-select list box in the filter as well. You can do that by looping
through the ItemsSelected collection. Example in this article:
Use a multi-select list box to filter a report
at:
http://allenbrowne.com/ser-50.html
 
First of all thank you Allen Browne for all the code you provided; it has
helped me out greatly. I have used the example listed below for a similar
scenario. However, i cannot seem to get it to work when try to apply the
filter to a subform. I have received the run time error: "2465", saying the
it can't field the field 'subfrmSalesLookup' referred to in your expression.

The main form is called frmSales and the sub form is called
subfrmSalesLookup. The line of code that i used is listed below.

Me!subfrmSalesLookup.Filter = strWhere

Thank you so much for all of your help.
 

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

Back
Top