Results 1 to 2 of 2
  1. #1
    Alex Motilal is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2008
    Location
    Coimbatore, India
    Posts
    192

    Message Box


    Hello everybody, I am developing a Hotel Booking Database for a new Hotel. I do have the following tables among other tables: 1)tblGuests GuestID (PK - Auto Number) and other fields such as Name and address 2) tblRooms RoomNumber (PK - Text) 3) tblGuestBooking GuestID (Child) RoomNumber (Child) dateOfBooking (Date) dateOfLeaving (Date) I am creating a Form for Bookings. When a room number is selected in the Combo Box, if the room is occupied, I want a Message box to appear informing that the room is occupied and instructing to select another room. The scenarios are as follows: 1) Since the Hotel is new, some rooms are yet to be occupied, so that both the dateOfBooking and dateOfLeaving fields may be empty. Status -Vacant 2) Some rooms might have been occupied and yet to be vacated. Status- Occupied 3) Some rooms might have been booked and vacated. Status – Vacant I tried to create a query. It is successful. However, for a particular room earlier booked and vacated and presently under occupation, it appears two times, one for Vacant and the other for Occupied. I want only one status for each room. I think some of the experts can help me to create a function or the correct query. Alex

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Would this method help?

    http://www.baldyweb.com/OverLap.htm

    You would need an additional criteria for the room number.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Message Box
    By dr223 in forum Access
    Replies: 11
    Last Post: 01-12-2012, 11:59 AM
  2. Message Box
    By JayX in forum Access
    Replies: 6
    Last Post: 12-13-2011, 02:28 PM
  3. Help with message box
    By Cablenm in forum Access
    Replies: 9
    Last Post: 10-14-2011, 05:06 PM
  4. Message Box
    By BorisGomel in forum Programming
    Replies: 6
    Last Post: 04-25-2011, 02:16 PM
  5. message box help
    By shaz10010 in forum Forms
    Replies: 1
    Last Post: 04-17-2009, 09:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums