Double Booking VBA

margybear

New member
Local time
Today, 00:32
Joined
Feb 13, 2012
Messages
9
I know there are a lot of previous threads about double booking, but I'm really not sure how to carry this one out.

Currently, my database is a B&B. In the B&B, there are 3 types of each room (3 Standard, 3 Double and 3 Deluxe).

I want to have a check availability button, so I can check if the room is available. However, I need to check that the room is/ is not available between a range of dates, as a date of arrival and date of departure are included.

Currently, I have the relevant fields stored in a query:
  • Date of arrival
  • Date of Departure
  • Type of Room

I have carried out a similar process before, but it was for a singular date and time. Would it be possible to make a DCount function to calculate the number of bookings between the two dates?

So the room is only available if that type of room has not previously been booked between the selected dates? Or the date of the new customer's arrival must be greater than the previous customer's departure date, etc etc.

Sorry, I'm a basic Access user, if you need me to specify anything else, please say!
 
Thanks for helping, but I still really don't know what to do :(
Do I need to search for the overlaps in a query, and then use DCount to count the records in the query? Or can I do it all with VBA?
I'm sorry, I'm really basic with Access :(
 

Users who are viewing this thread

Back
Top Bottom