I have a form with multiple combo boxes relating to basic customer information from a table. What I want on this form are multiple combo boxes that allow the user to set the criteria they are looking for and hit a commband button that will run that filtered data and open another form.
I have gotten this to work with just one combo box, but it does not recognize the other criteria.
Here is the vba I am using from the OnClick command button:
Private Sub Command5_Click()
DoCmd.OpenForm "ALLCUSTOMERSFORM", , , "[BROKER] = """ & Me![Combo1].Column(0) & """"
DoCmd.OpenForm "ALLCUSTOMERSFORM", , , "[ZONE] = """ & Me![Combo2].Column(0) & """"
End Sub
What it is currently doing is just opening the All Customers Form based on the last combo box selected (ie, only from that zone).
In the end, I'll have many combo boxes, so I need something that will work.
Any suggestions are appreciated!
I have gotten this to work with just one combo box, but it does not recognize the other criteria.
Here is the vba I am using from the OnClick command button:
Private Sub Command5_Click()
DoCmd.OpenForm "ALLCUSTOMERSFORM", , , "[BROKER] = """ & Me![Combo1].Column(0) & """"
DoCmd.OpenForm "ALLCUSTOMERSFORM", , , "[ZONE] = """ & Me![Combo2].Column(0) & """"
End Sub
What it is currently doing is just opening the All Customers Form based on the last combo box selected (ie, only from that zone).
In the end, I'll have many combo boxes, so I need something that will work.
Any suggestions are appreciated!