In the code below I attempt to use wildcards (*) in a = in SQL for MS Access.
I want to compare the contents of a textbox with a field in a table and if that field contains the textbox string include the record in the recordset.
Case 4:
tempKeywords = Me.txtKeywords
'tempContactTypeID = Me.cboContactType.Column(0)
'tempContributionTypeID = Me.cboContributionType.Column(0)
SQL_1 = "SELECT Contacts.*" _
& " FROM Contacts INNER JOIN Contribution ON Contacts.ContactID = Contribution.ContactID" _
& " WHERE Keywords =*" & tempKeywords & "*" _
& " ORDER BY LastName"
MsgBox (SQL_1)
RegenQuery "Test", SQL_1
End Select
This code errors.
Any suggestions to get the following line of SQL to work:
& " WHERE Keywords =*" & tempKeywords & "*" _
Thanks,
Dean.