Filtering a form
I have a form that displays the relevant info about the Customers, it is based on a query (QryCustomers).
I want my users to be able to filter the form based on characters typed into a Textbox for instance:
if the user types: "Carl" in the Textbox I would like to filter all the records with "Carl" anywhere in the Customer_Name field to be displayed
When I use the formula:
in the Criteria column of the query it returns the required records, but when I try to reproduce this in a VBA module. i.e.
Dim Strfilter as string
Strfilter = "[Customer_Name] Like *[Me.searchName]*"
I have tried various alternatives using the Ampersand & and the Sigle quote ' , but each time I seem to get an error(usaully a syntax error)
can anyone help?
ps I have also tried to create a Recordset but I run into the same problem the compiler doesn't seem to want to recognise the wildcard * character. In any case i'm still trying to figure out how to asign the new recordset to an opoen form?