Help with Access needed: Dealing with dates

ChiknHead

Senior member
Jul 7, 2001
646
0
0
I have a class project of setting up a database for a hotel. I am suck on the reservation part of it.

If someone, lets say, checks in 10/29/2003 and stays 1 night. I have no problem there showing the room is reserved and cant be reserved by someone else for that night. Here is the problem, lets say they want to stay 4 nights.
How would you go about that? 4 database entries? If so, how do you figure the dates of 10/29/2003, 10/30/2003/ 10/31/2003, and 11/01/2003? Is there a function built in to do that? Or should you use the Calendar tool for check in and check out dates? And once again is there away to calculate the dates inbetween for database entries?

If someone could point me in the right direction I would really appreciate it. If you have read this far I am sure you have felt my frustration at some point. :)

Thanks Again for any help
Chick N. Head

 

jonmullen

Platinum Member
Jun 17, 2002
2,517
0
0
look into using a check in and check out date format...that should make things easier
 

BFG10K

Lifer
Aug 14, 2000
22,709
3,003
126
Yes, I'd probably add an entry against each room for each day someone stayed it, using the primary key of the customer.

If you want to find out the rest of the days you can simply add 1 to it (eg [your date] + 1) and Access should automatically increment it correctly. You can use VB code to loop through the number of days the person is staying and add one record per day against that room.