I am creating a Dentist Booking form, for my A level project.
I have the following Tables:
Appointments
Appointment ID
Dentist ID
Patient ID
Appointment Date
Appointment Time
Appointment Type
Dentists
Dentist ID
Dentist Surname
Nurses
Nurse ID
Patients
Patients ID
Forename
Surname
Address line 1
Address line 2
Postcode
Phone number
Basically my problem is that in my data input forms, that i have created I need it to bring up an error message when a dentist is about to be double booked.
e.g.
If dentist 1 has an appointment on the 22/10/08 at 10:00 then that dentist can not be booked on that date and time again. but Dentist 2 and 3 can be.
I have tried to work this out for many hours and havnt really got close.
The system also has the following relationships
The avialble table is from my attempt to do this..it is irrelevant really it just contains the list of available times.
Thank you alot in advance to anyone who can help me, im sorry if there is repeated problems like this and threads all over the place. but i dont really have time to be searching for them and adapting them to my system.
if you feel the need to contact me :jwkey@hotmail.com