Hi,
I have made a database, the table, the query, the form, I have also made the Country: (search box) to work. So far so good. I have added a combo box named Certification. I sometimes want to search the database by using the search box only, sometimes use the combo box only and sometimes use both (search box and combo box).
When I made the combo box at first place, I selected the "I want the combo box to get the values from another table or query". When I finished, I run the combo box and I got a huge drop down menu (ABS, DVN-GL and LLOYDS was shown many many times). I deleted it so I made it again by using "I will type in the values I want". I typed the three categories (ABS, DVN-GL and LLOYDS) from Main Certification column. In the combo box I want the 3 categories to appear (one time each).
I added some code to make it run but nothing!
I did some changes to the code but can't find why it's not running. Well, it's the second time I'm using Access and can't figure that out. Somehow I feel that I must link the categories to each row they're being mentioned. For example: ABS is in many rows but I don't want all the ABS rows to appear in the combo box dropdown menu. I only want to show ABS once in the combo box dropdown menu and when I choose it to return all the results that include the ABS. This is the same for the rest 2.Code:Private Sub Command131_Click() Me.Filter = "[Country] Like '*" & [Text128] & "*' Or [Main Certification] Like 'ABS" & [Combo132] & "ABS' Or [Main Certification] Like 'DNV-GL" & [Combo132] & "DNV-GL' Or [Main Certification] Like 'LLOYDS" & [Combo132] & "LLOYDS'" Me.FilterOn = True End Sub
Ignore the "Other Certification" column.
Picture attached