Unanswered: How to use both buttons and a combo box to filter a subform?
Hi: I am creating a documentation management database using Access 2010, and I'm running into an issue trying to filter results in a subform using both buttons as the first filter and a combo box as the second filter.
Here's the search scenario:
First, users need to select a button to filter by department. My current buttons (one for each department) work well with the following code (which I snagged from another forum answer):
Private Sub fltrAdmin_Click()
Me.subfrmDocument.Form.Filter = "Department = 'Administration & Human Resources'"
Me.subfrmDocument.Form.FilterOn = True
Clicking this button filters all of my documents and shows only documents for Admin&HR. However, I need to further reduce the number of documents shown by the "Document Type" field by using a combo box containing terms like "Procedure" and "Policy". When the user selects one of the terms, I want the subform to display results to match.
EX: Click Admin & HR button then select "Policy" from combo box to view only Admin & HR Policies.
What code/macro should my combo box contain? How should I connect it to the subform? Am I messing up with how I'm trying to filter the information?
Full disclosure: This is the most complex that I've ever gotten with Access, and I haven't used coding since high school. Overall, I'm not really familiar with VB commands and syntax anymore, and I'm having a hard time figuring out how to make the macro functions do what I want them to do.