Booking System Dates (1 Viewer)

esymmonds

Registered User.
Local time
Today, 18:26
Joined
Jan 26, 2004
Messages
36
Booking System Dates- Help Needed

Hi,

I was wondering if anyone can help me. I am a student doing a degree. for a project i need to make a booking sytem for a hotel.
I've got the system working fine, apart from when I book more than one night.

The feilds in the booking system are:

customer: custno, name, address etc
booking: roomno, date, custno.
room: roomno, roomtype, smoking

So you go into the first form and enter the booking criteria, arrival date, departure date, typeofroom, smoking. The system then checks which rooms are available. On the next form you choose the customer and then its time to add the booking records. So the last form gets the arrival date from the first form, the roomno from the second form and the custno from the third form. Then, using an append query that data is put into the booking table.

The thing is tho, that I want a seperate record for each day the room is booked so if two nights were booked to records would be saved, one for each night.

I'm not sure how to do this and i can't program in VBA.

Can anyone help me?

Emma
 

namliam

The Mailman - AWF VIP
Local time
Today, 19:26
Joined
Aug 11, 2003
Messages
11,695
Try something like:
Code:
sub AddBookings()
    dim BookDate as date
    dim LeaveDate as date
    BookDate = ArivalDate
    do while bookdate <= LeaveDate
         ' append here using the bookdate.
         bookdate = bookdate + 1
    loop
end sub

Hope you can figure it from here.

Regards
 

esymmonds

Registered User.
Local time
Today, 18:26
Joined
Jan 26, 2004
Messages
36
Thank you,

I will try that now!

Emma
 

Users who are viewing this thread

Top Bottom