turnerk200
Programmer
I have a form which is used for searching, i am using a field called "txtMatterName", in this field, for example i want people to be able to type "turner", and the code will find anything in the field with "turner" in it, for example "Ray Turner". I am doing this by opening a record set with a SQL string and using a wildcard character, unfortunately this does not work! Here's is an example of my SQL string, i know I have the wrong syntax where i have the wildcard (I think) but cannot make it work! I have done this before but cannot seem to remember, please can somebody help.
strsql2 = "SELECT tblTaskPrimary.MatterNo, tblTaskPrimary.MatterStatus, tblTaskPrimary.MatterName, tblTaskPrimary.PolicyNo, tblTaskPrimary.DateReceived, tblTaskPrimary.Description FROM tblTaskPrimary WHERE tblTaskPrimary.MatterName Like Forms!frmSearch!txtMatterName & " * ";"
Thank you.
strsql2 = "SELECT tblTaskPrimary.MatterNo, tblTaskPrimary.MatterStatus, tblTaskPrimary.MatterName, tblTaskPrimary.PolicyNo, tblTaskPrimary.DateReceived, tblTaskPrimary.Description FROM tblTaskPrimary WHERE tblTaskPrimary.MatterName Like Forms!frmSearch!txtMatterName & " * ";"
Thank you.