My DoctorAndPodiatristTB contains 3 fields, ResidentsName, AppointmentTime and DoctorOrPodiatrist. My DoctorAndPodiatristQ contains the same 3 fields.
The Doctors records will have a "D" in the DoctorOrPodiatrist field and the Podiatrist records will have a "P" in the DoctorOrPodiatrist field.
When I send my email: DoCmd.SendObject acSendQuery, "DoctorAndPodiatristQ", acFormatRTF, "rwshea220540@outlook.com", , , "Test", "Sending an email from VBA"
If I am sending the email to the doctor, I need code to change the DoctorAndPodiatristQ to select only the records with "D" in the DoctorOrPodiatrist field before I send it.
If I am sending the email to the Podiatrist, I need code to change the DoctorAndPodiatristQ to select only the records with "P" in the DoctorOrPodiatrist field before I send it.
Any help would be greatly appreciated. Rico