Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2011
    Posts
    2

    Unanswered: Search button- form creation

    Hi

    Currently I am trying to create a database with relationships customer booking and cottage. So I have got an issue with creating a search button which will search for available cottage when start date and end date will be entered. Basically by entering two dates(parameter boxes) in the form or quary will go throught the booking id's and check which cottages are not used at the date which it is required.
    Could anyone please help me with this issue, it may sound easy for some of you, however, I am bit stuck on it.

    below you can find .accdb file with my sample database hope someone will be able to sort it out. Thanks
    Attached Files Attached Files

  2. #2
    Join Date
    Oct 2009
    Posts
    340
    Lets call the desired Start, End dates: DStart and Dend
    And the existing booked table has Start and End dates: SDate and EDate

    Available =
    (DStart > SDate AND DStart >= EDate)
    AND
    (DStart < SDate AND DEnd < SDate)

    hope this helps
    www CahabaData com

  3. #3
    Join Date
    Jan 2011
    Posts
    2
    I don't really know how to make the form to do such a thing like checking dates and displaying them in the results. Would you be able to add the form onto that file I attached. NTC you gave me the criteria, however my problem is that I am not sure where to put it while creating form...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •