S
spacerocket
I am doing a Contacts db. All contacts are grouped into their respective
category, ie. Supplier, Purchaser, etc. I would like to let user search for
Category from a combo box cbxSearchCat in a Search form (eg. only show
Supplier contacts).
Currently I can search from a text box, but I'm not sure how to search from
a combo box. The control source for this cbx is CategoryID. (both Contacts &
Category tables are linked via CategoryID). My search from text box code is
as below:
strWhere = "CompanyName LIKE '*" & txtSearchString & "*'"
Form_F_Contacts.RecordSource = "select * from Contacts where " & strWhere
DoCmd.Close acForm, "F_Search"
Thanks a lot for your advise.
category, ie. Supplier, Purchaser, etc. I would like to let user search for
Category from a combo box cbxSearchCat in a Search form (eg. only show
Supplier contacts).
Currently I can search from a text box, but I'm not sure how to search from
a combo box. The control source for this cbx is CategoryID. (both Contacts &
Category tables are linked via CategoryID). My search from text box code is
as below:
strWhere = "CompanyName LIKE '*" & txtSearchString & "*'"
Form_F_Contacts.RecordSource = "select * from Contacts where " & strWhere
DoCmd.Close acForm, "F_Search"
Thanks a lot for your advise.