I have a form called frmPatientLookup that has a subform called
frmPatientLookupResult that is based on a query
when I click on the command button it gives me records based on
the critia I have inputed. But it also creates a blank record.
Why am I getting that blank record? and how can I correct it?
Newbie in search of knowledge
frmPatientLookupResult that is based on a query
Code:
SELECT tblPatientDemo.LastName, tblPatientDemo.FirstName,
tblPatientDemo.DOB, tblPatientDemo.Gender, tblPatientDemo.PatientID
FROM tblPatientDemo
WHERE (tblPatientDemo.LastName Like forms!frmPatientLookup!txtLastName
& "*" Or forms!frmPatientLookup!txtLastName Is Null) And
(tblPatientDemo.FirstName Like forms!frmPatientLookup!txtFirstName &
"*" Or forms!frmPatientLookup!txtFirstName Is Null) And
(tblPatientDemo.DOB Like forms!frmPatientLookup!txtDOB & "*" Or
forms!frmPatientLookup!txtDOB Is Null) And (tblPatientDemo.Gender Like
forms!frmPatientLookup!cboGender & "*" Or
forms!frmPatientLookup!cboGender Is Null);
when I click on the command button it gives me records based on
the critia I have inputed. But it also creates a blank record.
Why am I getting that blank record? and how can I correct it?
Newbie in search of knowledge