I have a form that shows my tblCompanies.
I have a field in tblCompanies that sets the lngCompanyType (supplier, customer, etc.)
Also on the form I have a "filter" comboBox (fltrCompanyType) that allows the user to filter by lngCompanyType. This works fine with the following code:
I would like to allow the user to "filter" by more fields. For instance:
Only show the Companies that are "Suppliers" and located in "Michigan" (this is the strCompanyState field in the tblCompanies table).
Eventually I will have up to four fields that the user could "filter" by. I can apply one filter at a time, but I don't know how to "filter" the already "filtered" data. Any ideas?
Thanks,
Jason
I have a field in tblCompanies that sets the lngCompanyType (supplier, customer, etc.)
Also on the form I have a "filter" comboBox (fltrCompanyType) that allows the user to filter by lngCompanyType. This works fine with the following code:
Code:
Private Sub fltrCompanyType_Change()
Form_frmCompanyContacts.RecordSource = "SELECT * FROM tblCompanies WHERE tblCompanies.lngCompanyType = " & fltrCompanyType.Value
End Sub
Only show the Companies that are "Suppliers" and located in "Michigan" (this is the strCompanyState field in the tblCompanies table).
Eventually I will have up to four fields that the user could "filter" by. I can apply one filter at a time, but I don't know how to "filter" the already "filtered" data. Any ideas?
Thanks,
Jason