For my computing project last year I created a simple booking system in Access 2003 with a little bit of VBA to enhance it a little. However this year I need to improve it.
One of the main problems I found with my booking system is that double bookings can be made. An example:
Room One
First booking:
Arrival: 12/06/08
Departure: 16/06/08
Second booking:
Arrival: 12/06/08
Departure: 16/06/08
With my current system those two bookings could be made in the same room as I've got no checking for it. Sure I could check to see if the date of arrival equals the date of arrival of another booking. But wait, here's another example:
Room One
First booking:
Arrival: 12/06/08
Departure: 16/06/08
Second booking:
Arrival: 10/06/08
Departure: 17/06/08
That's still a double booking but the second booking would fall through and still be made as if I was to check if date of arrival equals a previous date of arrival it wouldn't find anything as the dates are different but they still overlap.
I have two ideas of which I know how to do neither code wise.
Firstly I could give a physical imagery representation of the bookings. I've found a screenshot of a current booking system showing exactly my idea: image example basically the system will show in some form of a table when each room is booked at certain dates. To make a booking the user can just double click on an empty date and make the booking. However I have absolutely no idea how to do this table in VB.net (my language of choice, if it can be done in anything else then please do say and maybe I can find a work around).
My second idea would be to use just plain code. But I have no idea how to do this either. How do I check whether bookings overlap? If you have any ideas please say.
Sorry for the large block of text but eh. My education rests on finding a solution. I'm not asking anyone to just give me the code and tell me how to do it exactly, but please help me find the right information that I need.
Thanks in advance.