Page 3 of 3 FirstFirst 123
Results 31 to 44 of 44
  1. #31
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,593

    I created a query on tblBooking - with this SQL:

    Code:
     
    SELECT tblBooking.Booking_ID, tblBooking.Guest_ID, tblBooking.Plot_ID, tblBooking.[Paid?], tblBooking.StartDate, tblBooking.EndDate, tblBooking.TotalCost, IIf(Date() Between [StartDate] And [EndDate],"Booked","Available") AS BookedToday
    FROM tblBooking;
    Let me know if this works for you.

  2. #32
    Brocco is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    23
    yeah today

  3. #33
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,593
    see if you can plug that SQL from my previous post into a query on tblBooking & run it.

  4. #34
    Brocco is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    23
    there all going to be available anyway cause i've no bookings on todays date.
    lets say I'll take the 15th of November '11. Can i edit this to bring all others back in the query except for the 10th - 18th of November booking ?

  5. #35
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,593
    Try this - instead of Today - it is checking for 7 days ago:
    Code:
     
    SELECT tblBooking.Booking_ID, tblBooking.Guest_ID, tblBooking.Plot_ID, tblBooking.[Paid?], tblBooking.StartDate, tblBooking.EndDate, tblBooking.TotalCost, IIf(DateAdd("d",Date(),-7) Between [StartDate] And [EndDate],"Booked","Available") AS BookedOnNov15
    FROM tblBooking;
    Let me know if that works.

  6. #36
    Brocco is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    23
    When I enter that code it still brings back every Booking...

    fml

  7. #37
    Brocco is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    23
    it does however say booked next to two of the Bookings

  8. #38
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,593
    Yes- that is what I did with the Extra field.
    You can put "Booked" in the Criteria for that last field and then you'll only see the Booked Plots

  9. #39
    Brocco is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    23
    the next step would be to hide the those two Bookings and keep the ones which are not booked

  10. #40
    Brocco is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    23
    I need to see the ones which aren't booked :S

  11. #41
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,593
    put "Available" in the Criteria for the last field.
    Later - you can uncheck this field in the query if you don't want to see it.

  12. #42
    Brocco is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    23
    ok that worked, I'll copy that to my Proper database and hopefully that'll work, I'll let you know

  13. #43
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,593
    All the best!

  14. #44
    Brocco is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    23
    You Sir/Madam are a Genius !!!

    Thanks alot for your help over the last few hours, would still be failing myself without ya!

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 12
    Last Post: 04-26-2012, 04:01 AM
  2. query to update a date based on another date
    By tkendell in forum Access
    Replies: 3
    Last Post: 06-29-2011, 09:32 PM
  3. Using Date in Access
    By ricyac in forum Queries
    Replies: 1
    Last Post: 06-28-2011, 08:46 AM
  4. Replies: 2
    Last Post: 07-31-2009, 06:56 AM
  5. Access Date/Time....I need a "generic" date.
    By beastmaster in forum Access
    Replies: 2
    Last Post: 12-29-2005, 12:55 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