PC Review


Reply
Thread Tools Rate Thread

Booking out a Guest suite , avoiding double booking in Access

 
 
=?Utf-8?B?V29iYmxlcw==?=
Guest
Posts: n/a
 
      14th Feb 2006
I am trying to make available the facility to book out a guest suite shared
by 33 other apartments but need a means of validating the date(s) are
available based on existing bookings. I am prepared to link to an easy
interface in outlook if its possible but would prefer to stay in access. Can
anyone help, All i need is start date, end date and apartment number
 
Reply With Quote
 
 
 
 
Douglas J Steele
Guest
Posts: n/a
 
      14th Feb 2006
Allen Browne has some information about this at
http://www.allenbrowne.com/appevent.html

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Wobbles" <(E-Mail Removed)> wrote in message
news:006A48BA-2F22-4E5D-BDCB-(E-Mail Removed)...
> I am trying to make available the facility to book out a guest suite

shared
> by 33 other apartments but need a means of validating the date(s) are
> available based on existing bookings. I am prepared to link to an easy
> interface in outlook if its possible but would prefer to stay in access.

Can
> anyone help, All i need is start date, end date and apartment number



 
Reply With Quote
 
Albert D.Kallal
Guest
Posts: n/a
 
      14th Feb 2006
And, to prevent collisions, the logic here is quite simple:

A collision occurs when:


RequestStartDate <= EndDate
and
RequestEndDate >= StartDate


The above is thus a rather simply query, but if any collision occurs, the
above will return records..and you simply don't allow the booking.

If your case, you would add the room number to the above....

RequestStartDate <= EndDate
and
RequestEndDate >= StartDate
and
RequestRoomNumber = RoomNumber


In other
words, since we NEVER allow booking with a collision, then the above simply
statement will work for us.


dim strWhere as string
dim dtRequeestStartDate as date
dim dtRequestEndDate as date


dtRequestStartDate = inputbox("Enter start Date")
dtRequestEndDate = inputbox("Enter end date")


strWhere="#" & format(dtRequestStartDate,"mm/*dd/yyyy") & "# <= EndDate" & _
" and #" & format(dtRequestEndDate,"mm/dd*/yyyy") & "# >= StartDate"


if dcount("*","tableBooking",strW*here) > 0 then
msgbox "sorry, you can't book
....bla bla bla....

The above is just an example, and I am sure you would build a nice form that
prompts the user for the booking dates. Howver, what is nice here is that
the simple condistion above does return ANY collsion. A very easy problem to
solve...

--


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Room booking - booking someone's office Eric Baines Microsoft Outlook Calendar 0 29th Mar 2010 05:40 PM
can i audit a calender booking to see whos made the booking? Jim Microsoft Outlook Discussion 0 27th Nov 2007 09:16 AM
prevent double booking hired equipmnt iin an Access file =?Utf-8?B?bWFyeWZheQ==?= Microsoft Access Form Coding 4 5th Jun 2006 01:39 PM
direct booking allows double booking from the calendar Mike Microsoft Outlook Calendar 1 7th Dec 2003 07:52 PM
Booking a resource adjacent to another booking Pascal Dumais Microsoft Outlook Calendar 0 10th Sep 2003 08:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:23 AM.