Hotel database assistance

Fateful Kai

New Member
Joined
Sep 27, 2003
Messages
1
Hey everyone.

I need some help on this hotel database I am starting to run.

I am going to create 2 databases; one for customer details, and one for what each room has.

In the customer details, I will include many things, 3 of the most important being the room number, the start date of thier stay and the date they will leave.

My problem comes now!

Say, for instance, someone was staying in room 2 from 25th September to the 28th September, but somebody else wanted room 2 on the 26th September. How on earth do I get the database to check if someone is in that room between or on those dates, and get the database to tell me?!?!

I have tried all I know (my knowledge of Access being limited!) and i desperatly need :rolleyes: !!!

Thanks in advance! :)
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hi, you've got a classic "Many-To-Many" setup here ... one Customer can make many bookings, one Room can have many Customers. Access (and other databases) need a joining table to make sense of it. You've got a Primary Key for each table so far, right? CustomerID, RoomID.
You need to make a third table, Room Bookings, with the following fields (at least) ---
CustomerID (Number, Long Integer -- check the bottom half of the screen in Design view)
RoomID (Number, Long Integer)
Booking Date (Date).
To prevent double-booking a room, you need a compound Primary Key. Do this:
In Design view, click the RoomID field in the left border and Control-Click the Booking Date field. Both should be highlighted. Then click the Primary Key icon on the toolbar -- you'll see key icons appear next to both fields. Save the table, and you should be ready to go.

This is the table in which you make all your bookings. You should create a Booking form based on it. The table should be related to the Customers and Rooms tables, One-to-Many, with referential integrity applied.
If none of this makes sense I'd recommend that you attend a 2-day Access Introduction course, and and 2-day Access Advanced course. Generally the Intro courses show you how to USE a database. The Advanced courses show you how to DESIGN (or at least get started). You can also get a good primer on the table design process by going to this link
http://support.microsoft.com/search...dType=ANY&maxResults=25&Titles=false&numDays=
and downloading the relevant file for the version of Access that you use. It's based on the Northwind sample database that ships with Office.

HTH
Denis
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,606
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top