double booking using dates -HELP (1 Viewer)

QBC

New member
Local time
Today, 06:56
Joined
Aug 23, 2009
Messages
9
I am working on a project for school and need some serious help.
I have one table that I have been working off so this should hopefully be really easy for a lot of you.

The project is about a hotel business.

The tables consists of a guest name, room name, arrival date, departure date.

The assignment is to create a way to ensure that no rooms will be double booked at any point in time. I think the best way to do this may be a report of some sort but I cannot figure out how to do this.

Your help is much appreciated.
 

John Big Booty

AWF VIP
Local time
Today, 23:56
Joined
Aug 29, 2005
Messages
8,262
I'm pretty sure this Hotel Booking project comes up every year, and has been discussed here more than once before, and I'm pretty sure that this particular problem come up before too.

I'll wager that if you search this forum you will find the solution.
 

QBC

New member
Local time
Today, 06:56
Joined
Aug 23, 2009
Messages
9
thanks ruralguy. sorry for double posting.
the article is very helpful though are you able to tell me where to post the coding in Access?

thanks again
 

RuralGuy

AWF VIP
Local time
Today, 07:56
Joined
Jul 2, 2005
Messages
13,825
...the article is very helpful though are you able to tell me where to post the coding in Access?
Without knowing more about how your system operates I can only guess. The BeforeUpdate event of a control or the form is a good place to check for the validity of the entry and Cancel the event with a message if need be.
 

QBC

New member
Local time
Today, 06:56
Joined
Aug 23, 2009
Messages
9
it is a very simple database that includes one table and one query. there are no forms.
is there a place in the query design?
 

RuralGuy

AWF VIP
Local time
Today, 07:56
Joined
Jul 2, 2005
Messages
13,825
There are no triggers in Access so you will need a form to run the code/query and that is the place to "ensure that no rooms will be double booked at any point in time" as you stated in your original post.
 

QBC

New member
Local time
Today, 06:56
Joined
Aug 23, 2009
Messages
9
rural guy, thanks for the link. I tried it again and it worked like a charm.
 

Users who are viewing this thread

Top Bottom