Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 criteria in ApplyFilter Statement?

Status
Not open for further replies.

mbaddar

Programmer
May 10, 2001
120
US
Hi,

Does anyone know if it's possible to have 2 criteria in
an apply filter statement. I have 2 unbound combo boxes on
a form with a subform. One of the combo boxes is for
Catalog Number and one is for CatalogPage. After a user selects a Catalog and Catalog Page, all the Bill of Materials for that Catalog Page and Catalog should be displayed. So, I need to
have an apply filter that will only return
records from a particular Catalog and Catalog page.
Right now, this is what I have:
DoCmd.ApplyFilter , "CatalogPage = " & Pagecbo


Is this possible to add "Catalog = " & Catalogcbo?

Thanks,
MBaddar
 
Why not just set the RecordSource for the subform to a query that references the combo box contents in the criteria? The subform is supposed to requery automatically, but I've found that it doesn't always happen. So include a requery statement after you change the RecordSource.

Uncle jack
 
Thanks,

That is a good suggestion for the subform. However (and I'm sorry I didn't explain this well before), I also
have a header section on the top of the form where the information changes depending on what is selected
in the two comboboxes.

Thanks,
MBaddar
 
I don't see that as much of a problem either; what exactly are you having difficulty with?

Uncle Jack
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top