My search form allows users to search on license plate number. Because of vanity plates etc, there isn't a set pattern. Some have spaces, some do not. Since there are several search fields available, I build the sql. Here is the line for the license plate
Note. The and is stripped off if its not needed.
The search works if you put it in exact but if the value isn't stored in the database that way it doesn't return the record.
i.e. fls179 in the database is fls 179. If I enter fls179 on the form, I don't get any records; if I enter it as fls 179 it returns the record.
Since the database values are stored in a variety of ways, I need my sql to find it either way. Thanks lhuffst
Code:
ssql = ssql + " tblParkingPermitVehList.fldLicenseNo = '*" & fldLicenseNo & "*' And "
The search works if you put it in exact but if the value isn't stored in the database that way it doesn't return the record.
i.e. fls179 in the database is fls 179. If I enter fls179 on the form, I don't get any records; if I enter it as fls 179 it returns the record.
Since the database values are stored in a variety of ways, I need my sql to find it either way. Thanks lhuffst