Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shouldn't be this hard - Filter using combo box 1

Status
Not open for further replies.

adamr99

Programmer
Jun 25, 2001
59
US
I am having trouble using the DoCmd.ApplyFilter command.

I want it to get the filter criteria from a combo box. The code I am currently using is as follows:

DoCmd.ApplyFilter , "[Contact_Title] Like 'Combo8.Text' & '*'"

I have tried every variation of the above. [Contact_Title] is the feild that I want to filter by, and Combo8 is the combo box that has the text that I want to filter by. I know that this is really easy, however it is giving me fits this morning.

Thanks!
Adam
 
...Like '" & Combo8.column(0) & "'*"
column(0) - first column
column(1) - second column
etc.

Aivars

 
Try this.....

DoCmd.ApplyFilter , "[Contact_Title] Like '" & Me![Combo8.Text] & "'"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top