Results 1 to 2 of 2
  1. #1
    Mike Jeffreys is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2018
    Posts
    1

    Prevent record addition based on previous record dates.


    Hi all,

    I am building a simple bookings DB for a guest house. I have a main table (Bookings) that has the details of bookings that have been made, Name, Date & so on. Have a form that allows the addition of more bookings.
    What I would like to do is prevent any further bookings being made on dates that are already full up i.e. already have 6 bookings.
    So, on the bookings form, if somebody enters a date which already has 6 bookings on, the booking cannot be completed & a message is displayed to the user.

    Thanks in advance for any help.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    When you are filling a form to add bookings, you must check to see that you have some "rooms available". If no rooms are available, then indicate no Vacancy and prevent further booking/assignments.

    See this in code repository

    Here is a generic data model from Barry Williams' site that deals with Hotels and Reservations
    It may have more detail than you need, but it is intended as a starting point - you can add, remove, edit as necessary for your needs.

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

Similar Threads

  1. Replies: 3
    Last Post: 12-10-2018, 12:25 PM
  2. Replies: 9
    Last Post: 03-01-2017, 10:00 AM
  3. Replies: 8
    Last Post: 07-06-2013, 05:13 PM
  4. Replies: 1
    Last Post: 03-02-2012, 11:09 AM
  5. New record based on previous
    By Zingrrl in forum Forms
    Replies: 1
    Last Post: 11-19-2011, 01:16 PM

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