I have a form called “Scheduling-Add” which is used to schedule a patient. This form has a “Patient Name” button when clicked will open a “Patients” form used to add a new patient. I want to use the following criteria to check for duplicate records before saving a new patient record
First check both MRN fields (Not required field) to see if they exist in the “Patient” table. If they do, a message should display “Duplicate exist and cannot save to database” if not duplicate check other fields that were input in the entry before saving
Second, check for “Last Name” (Required Field). There must always be a last name. If that field is blank a message should pop up that Last name is required. If a last name is present including other fields, this is checked in the table to see if there is a duplicate. If it does message is displayed “name exist and cannot save” If not duplicate save to table
Third if the new record has No “first name” & No “DOB” are Null (Not required fields), it checks the last name and any other field filled to see if it exist. If it does message is displayed “last name exist and cannot save” or if not duplicate save record.
How can I accomplish this goal. Attached is a copy of my database. Thanks in advance