Duane Hookom's calendarDisplay db

E

Eric Blitzer

This post is related to the Calendar display database
designed by Duane Hookum.

First thank you very much Duane.

The database is for doctors patients appointments. You
cannot add a record with the same date and starttime an end
time. That works well. However if a patient has a 2 hour
appointment the db allows a record to be added in the
middle of that appointment.
e.g.
Doctor John has a patient scheduled on March first from
1:00pm to 3:00pm.
You ar allowed to add a new appointment for that day from
1:30pm to 2:30pm.

What would it take to not allow overlapping appointments?

Thanks

Eric
 
D

Duane Hookom

Your welcome for the report demo. It wasn't meant to be a full-fledged
calendar app, just some sample reports.

You would need to add some code in the form's before update event that
checks to make sure that the following is not true
(AppointmentA.Start < AppointmentB.End and AppointmentA.End >
AppointmentB.Start)
 
E

Eric Blitzer

Duane,

I actually incorporated the reports into another
application that schedules conference rooms. I understand
what I would have to check for, but how do I identify
appointmentB start and end, ( the start and end of the
conflict of the record already in the db?

Eric
 
D

Duane Hookom

Do you have some table, field, and text box names? You should be able to
stick these into a DCount() function to determine if there is an overlap.
 
A

AZWM

Can anyone tell me exactly how to do this? I opened up the sample database
and it seems to be pretty close to what I want. However, I don't know how to
actually create this in my own database.
 
D

Duane Hookom

Which report? Do you have any information about your table structure? How
are your math skills?
 
Top