A family of Microsoft relational database management systems designed for ease of use.
I want to use 'Filter' to search by 'First Name' in my tblEmployees.
Me.Filter = " strFirstName= Like ' " &txtFilterFirstName& " * ' "
I want to add 'Like ' to use wildcard.
Do you think this is right code?
It seems to me that it's almost right, except that the equals operator (=) and the Like operator are mutally exclusive, and you seem to have extra spaces in the filter string. In some places an extra space doesn't matter, but in other places it does. I would write this:
Me.Filter = "strFirstName Like '" & txtFilterFirstName & "*'"
That assumes that "strFirstName" is actually the name of the First Name field in your table. Note also that this code will fail if txtFilterFirstName contains a single-quote or apostrophe ('). Maybe it would be better to use double-quotes around the specified name fragment, but to do that, you have to double up the double-quotes, like this:
Me.Filter = "strFirstName Like """ & txtFilterFirstName & "*"""