M
Matthew Scheperle
I have two combo boxes on a form. I want to be able to select Status such as
OPEN from one box and a year from the next combo box. Then click on Search
and pull up all records based on one or both selections. The results would
display in the detail section of the form. I can do this with the
DoCmd.ApplyFilter method in VBA for one box. However, how do I get it to
search by both criteria?
Example: This works BTW in a Private Sub event procedure...
If Me.year = "2009" Then
DoCmd.ApplyFilter , "[qryfrmViewAllRecords].[year]='2009'"
I then want a second box for Status so that they could find all OPEN,
CLOSED, or simply ALL status for 2009. I am trying to think of how I would
declare a variable, or combine the two "Where" clauses in VBA.
Thanks,
OPEN from one box and a year from the next combo box. Then click on Search
and pull up all records based on one or both selections. The results would
display in the detail section of the form. I can do this with the
DoCmd.ApplyFilter method in VBA for one box. However, how do I get it to
search by both criteria?
Example: This works BTW in a Private Sub event procedure...
If Me.year = "2009" Then
DoCmd.ApplyFilter , "[qryfrmViewAllRecords].[year]='2009'"
I then want a second box for Status so that they could find all OPEN,
CLOSED, or simply ALL status for 2009. I am trying to think of how I would
declare a variable, or combine the two "Where" clauses in VBA.
Thanks,