Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

STOP A DOUBLE BOOKING

Status
Not open for further replies.

mike1975

IS-IT--Management
Jun 26, 2001
38
GB
I am trying to setup an apllication that allows users to make reservations to one of two bays on a certain date from a set number of time slots. I have a table containing customer details and one which contains details of bookings.

I am trying to create a form where new bookings can be entered however I am not sure how to stop a double booking being made. I presume I will have to perform some form of check when a booking request is made however I am not sure how to go about this - my knowledge of VB is minimal(I am waiting for my Smith and Sussman book to arrive). I would really appreciate any help that anyone can give me.

Many thanks - MIKE
 
it all depends how you store the information?

one easiest way is to use the Bay Number AND the Date as the primary key but this doesnt allow for overlaps

but possibly the best way is to write a query to extract
"booking Date From", "booking Date untill" and "bay number" from the "bookings" and compare this to the booking date of the booking you are doing at the time.

To do this you use a "UNMATCHED" query and compare the results with your table of "bays"

i am working on somthing similar but there are a lot of things to take into account.

give me more details on what you want to achive an i can tell you how.
 
Me again

If you put your time slots in thier own table and have a "Time SlotID" number you clould use "Bay number" and Time slotID" as the primery key,
 
Thanks for that - I am still struggling though. The way I was hoping to do it was to maybe if I was to concatenate the date field,time field, and bay field and then do a check to see whether that already existed - i could use that concatenated field to check on(this could be the primary key perhaps). Can you use concatenation in Access 2000.

I don't know if this is the best way - but I am open to all suggestions.

MIKE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top