You are here:

Using MS Access/Access - Scheduling Database by Date & Time

Advertisement


Question
Hi.

I'm busy with a course scheduling database.  I need to schedule courses in a particular room which have a startdate, starttime, enddate and endtime.

I want to create a macro or something that informs the user when they have scheduled a course in the same room at the same time.  It doesn't matter if the course is the same.

THANKS!

Answer
A scheduling application is often the most difficult to design. Doing what you want depends greatly on your structure. Without knowing that structure its hard to be able to help.

I can tell you that I would envision at least three tables here. A rooms table, a schedule table and a course table. The Schedule table would look like this:

ScheduleID (Primary key Autonumber)
RoomID (Foreign key)
CourseID (FK)
Start
End (or duration)

I would prefer to use duration then an end time. I think it would make it easier to check for conflicts.

With a structure like that you could create a query that lists any schedule items where the start falls within a currently scheduled item.

HTH
Scott<>

Using MS Access

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scottgem

Expertise

I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience

I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

©2012 About.com, a part of The New York Times Company. All rights reserved.