Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 2nd, 2006, 12:36 PM
Registered User
 
Join Date: Feb 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Tankey
Default Booking program.

I'm currently doing a project that involves createing a booking database for a hall. Its almost completed but i've hit a wall.

Each day is split into 3 booking parts, morning, afternoon and evening. Some of these days are reserved for groups and need to be 'blocked' to prevent double booking. I was hopeing to intergrate the 'calendar control 9.0' but so far, frankly, i'm clueless. Unless there is another option where i can display a similer way in a form where its user friendly to just select a day, slot and continue a booking i'm very much open to suggestion. Furthermore if this can be displayed in a report or simply printed out from the form showing all bookings for a week would also be awsome.

I would normaly talk to my tutor about this, however he is on long term illness and the replacement teachers have no clue as my college is quite small (uk).

I know its a lot to ask but this is my last resort. If anyone is willing to help, any information your wish to share, please explain it aswell, due to the fact i'm a student and only have just started I would like to fully understand so i am able to do it with clear knowlage in future.

Thanks.

 
Old May 2nd, 2006, 03:56 PM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 142
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here's a way you can show your bookings and prevent double bookings. Create a table for bookings with the Date, Session (Morning/Afternoon/Evening using a Value List lookup), and Party identifier. Set the primary key for that table to be Date & Session. That prevents anyone from booking the same date/session if it's already there. Create a form that contains Calendar Control and a subform bound to the bookings table. Open up VBE (Alt-F11) and put the following code in the file for that form:

Private Sub Calendar0_Click()
Me.Bookings_subform.Form.RecordSource = "SELECT Date, Session, Party FROM Bookings WHERE Date = #" & Me.Calendar0.Value & "#;"
Me.Bookings_subform.Requery
End Sub

Edit any of the control names to match what you have. That will show what bookings are on a given day, and allow you to add new ones that don't conflict with existing ones. You can play around with code and appearance to make the interface according to your own desires at this point, whether you want to have a form that has an Option Group of the Sessions and disable the sessions on a given date, or what not. I'd really need more specifications before going into any further design.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Appointment Booking KDSTECH BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 11 May 29th, 2008 12:46 AM
Setup Project: Program not added in Start>Program arif_1947 VS.NET 2002/2003 2 March 31st, 2005 06:40 AM
Forward booking rahilahmed Pro VB Databases 1 June 16th, 2004 06:02 PM
Forward Booking rahilahmed Excel VBA 0 May 24th, 2004 09:25 AM
booking form LITOTES PHP How-To 2 June 4th, 2003 03:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.