The Student Room Group
Reply 1
Hmm...preventing double bookings... I needed to just highlight the double bookings for my project (Chemistry practical booking system).

Well if I had to do this, then what I'd do is create a "Find Duplicates" query (Click "New" in the queries section in access) and apply it to the field(s) that actually "defines" a double booking. For exampe in my project a double booking was defined as 2 or more bookings with the same practical ID, Date and room number.

So just apply the "Find Duplicates" query to the field(s) that you wish, and save it. Then in your bookings form, you would create a command button and build an event in VB that runs the query previously mentioned. Include an If/Then statement that checks whether there are records present after running the query or not, If there are, then this is a double booking and display a message box error of some kind. If there are no records present, then the booking is good to go, so just enter a DoCmd save record statement.

Hope that gave you a start...
Reply 2
This is very simple. All you need is an if statement in your save command button, so that it loops to check your whole database to see if there is a booking made with the same slot and date.

Im sorry but quite frankly i am not going to plagiarise
Reply 3
bauer
This is very simple. All you need is an if statement in your save command button, so that it loops to check your whole database to see if there is a booking made with the same slot and date.

Im sorry but quite frankly i am not going to plagiarise


what are you going 2 loose out on? Instead you will make alot of people happy by giving it...
Reply 4
Cheating is cheating.

Swallow it.

Move on.
Reply 5
i did this for my avce ict unit 6 database. you can see if my database is what your looking for http://www.e-male.me.uk and click on the avce ict tab, then find click on unit 6. yer i no the websites pretty dull, but its just a temp site, till i re-do it over the summer. i hope it helps!
Reply 6
I just made the slot and date as composite primary keys, then the user selected the date THEN made the booking on the slot, so trying to double book would show that there was already something there.

Latest

Trending

Trending