My experience has been mainly SQL Server. I am working on an Access 2003 database with a simple data entry form (frmNewPatient) for inserting new records into a Patient table. Before executing the insert, I want to check that there is no matching record already in the Patient table. The form has text boxes named txtLastName, txtFirstName, and txtSSN for entering unique data for a patient. Using VBA, I want to execute a query such as:
select * from Patient
where Patient.LAST_NAME = [Forms]![frmNewPatient]![txtLastName]
and Patient.FIRST_NAME = [Forms]![frmNewPatient]![txtFirstName]
and Patient.SSN = [Forms]![frmNewPatient]![txtSSN]
Also, how to check that the result set is empty.
Thanks,
Doug
select * from Patient
where Patient.LAST_NAME = [Forms]![frmNewPatient]![txtLastName]
and Patient.FIRST_NAME = [Forms]![frmNewPatient]![txtFirstName]
and Patient.SSN = [Forms]![frmNewPatient]![txtSSN]
Also, how to check that the result set is empty.
Thanks,
Doug