Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
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 June 16th, 2004, 09:36 AM
Registered User
 
Join Date: Jun 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access 97 and a booking system

I'm trying to create a caravan booking system for work. However i have run into alot of problems with my queries on my reserve table.

I want, when making a booking to be able to press a button and a list of available caravan pitches is displayed for those dates. There are 12 avaliable sites.

Can anyone give me some guidance?

 
Old June 18th, 2004, 03:57 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

Can you post the statements you already have? someone may be able to point you in the right direction.
 
Old June 24th, 2004, 10:04 AM
Registered User
 
Join Date: Jun 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

For example, the caravan park has 12 sites. Each site can be booked for a number of days throughout the year e.g. a weekend.

What i want to be able to do is provide a booking system to enable this. But at the moment i'm experiencing double bookings. The query doesn't seem to recognise the logic of the situation.

An example is: I want to book a caravan into site 5 for a weekend fri-sun, once i press the button return avaiable sites, i want it to return all sites that have no bookings on that site between those dates. I i create a query showing me the sites that are not avaible it works ok, but i want it to return me a list of the sites that ARE avaiable on those dates. I seem to be unable to invert the code.

Here's the SQL for the query that returns the sites that are not available. I want to invert this:

SELECT DISTINCT SITE.[Site#], SITE.Description
FROM SITE LEFT JOIN RESERVE ON SITE.[Site#] = RESERVE.[Site#]
GROUP BY SITE.[Site#], SITE.Description, RESERVE.Arr_date, RESERVE.Dept_date, RESERVE.[Site#]
HAVING (((RESERVE.Arr_date) Not Between [Forms]![SITE_RESERVATIONS]![Arr_date] And [Forms]![SITE_RESERVATIONS]![Dept_date] And (RESERVE.Arr_date)>Now())) OR (((RESERVE.Dept_date) Not Between [Forms]![SITE_RESERVATIONS]![Arr_date] And [Forms]![SITE_RESERVATIONS]![Dept_date] And (RESERVE.Dept_date)>Now())) OR (((RESERVE.[Site#]) Is Null));







Similar Threads
Thread Thread Starter Forum Replies Last Post
booking system newbie07 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 July 19th, 2007 04:17 PM
Modifications in Appointment Booking System newbie07 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 4 July 18th, 2007 11:49 AM
Appointment Booking System newbie07 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 July 18th, 2007 08:32 AM
booking system: first time using dates whyulil Classic ASP Basics 1 October 13th, 2004 09:03 PM
Celendar Booking System acdsky Classic ASP Basics 0 March 31st, 2004 02:42 AM





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