VBA syntax question
Posted on 2004-03-30
I have a search form that returns values in a subform. I recently added a field to this search form, but there is a problem. Below is the code that applies the LIKE statement to the querydef:
If Not IsNull(Me.VendItem) Then
strWhere = strWhere & "(itemvend1.[vend-item]) Like '*" & Me.VendItem & "*' AND "
If VendItem contains "#", the search will come up null. The SQL works fine, I am sure it is a syntax issue. Could someone assist me with this?
Thanks. Please let me know if you have any questions.