Filter with VBA

123dstreet

Registered User.
Local time
Yesterday, 18:30
Joined
Apr 14, 2010
Messages
122
Hi All, I have a little problem; I have a form that shows many records. I created a combo box at the top of the form to filter records by company. The filter code looks like

Code:
Me.Filter = "[Company] Like" & "'" & "*" & Me.Combo60 & "*" & "'"

The filter seems to work, but sometimes the company isn't spelled EXACTLY the way it is shown in the combo box, so I've tried using the LIKE operator but i can't get it to work, any suggestions??

thanks in advance
 
Are you getting the rowsource from the company names in the table? or from a master customer table. Do you have PK-FK relationships between tables?
 
The company names for both the Combo Box and the Company in the form have the same row source: its the master customer query for the database.
 
and [Company] is the FK to the main customer table
 

Users who are viewing this thread

Back
Top Bottom