0
votes

Ok so I've been trying to look for a solution to this since I'm new to access but can't find anything (seriously no one has experienced this problem?)

Here's the problem:

I'm trying to filter the data in my CustomerSearch form by last name using a combo box which includes all the last names in my Customer table.

Using an "After Update" event macro, I use the "ApplyFilter" action and input the "Where Condition" with the following lines with different results:

(1) [LastName]=[Forms]![CustomerSearch]![cboLastNameSearch]
--> gives me blank results

(2) [LastName]=[cboLastNameSearch]
--> a popup appears every time I use the combo box asking for a last name input, which defeats the purpose of making the combo box in the first place.

where cboLastNameSearch is the name of the combo box.

Could anyone please kindly explain why (1) doesn't work, and how to improve on (2) so the popup stops showing? Thanks in advance.

1

1 Answers

0
votes

Try this:

"[LastName]='" & [Forms]![CustomerSearch]![cboLastNameSearch] & "'"