LIKE Operator used with WHERE

cedtech23

Registered User.
Local time
Today, 10:24
Joined
Jan 28, 2006
Messages
25
Not sure where to place LIKE operator in the statement below

Code:
SELECT tblPatientDemo.LastName, tblPatientDemo.FirstName, tblPatientDemo.DOB, tblPatientDemo.Gender
FROM tblPatientDemo ( where (tblPatientDemo.LastName= forms!frmPatientLookup!txtLastName or  forms!frmPatientLookup!txtLastName is Null)


I tried where (like (tblPatientDemo.LastName= forms!frmPatientLookup!txtLastName)


But I received a syntax errors

Basically the user has to enter the full name of the patient, I want them to be able to enter first couple letter of the patient name..

What am I doing wrong??
 
You need to append a wildcard character (* in access) for the LIKE
like (forms!frmPatientLookup!txtLastName & "*")
if they are supplying the start of the lastname
(I.E. RE* = REUT or RETTUEIGD or REwhatever) it is case insensitive BTW
 

Users who are viewing this thread

Back
Top Bottom