Unmatched Query - How to look for available cars on a specific date?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • David Biscan
    New Member
    • Mar 2011
    • 5

    Unmatched Query - How to look for available cars on a specific date?

    Hi,

    I struggle with my project big time... I am creating a database based on a car rental.

    I am trying to create a query where after entering a specific date, it will list all of the cars that are NOT BOOKED and are available on that date.

    I have created an unmatched query, and the criteria for "Booking ID" is "Is Null". It lists all the cars that are available at any day in this moment in time. After entering "[Enter Date]" as a criteria for "Date" field and running it, it doesnt show any results. :(

    Help!
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You'll want to filter for all cars where the date you enter is not between the start and end date of the reservation.

    Comment

    • David Biscan
      New Member
      • Mar 2011
      • 5

      #3
      Thanks Rabbit for your reply.

      So what is the solution for my problem? The rental is takes only 1 day, therefore I have not got sucha fields as "Start date of a rental" and "End date of a rental".

      I am still confused, and have no idea what to do and what I need to enter as criteria in the query design.

      Please help Rabbit :)

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        Then that's easy, all you need to do is
        Code:
        SELECT * FROM TableCars
        WHERE DateField <> [Enter Date]

        Comment

        • David Biscan
          New Member
          • Mar 2011
          • 5

          #5
          You might actually laugh at me right now, but as an amateur, I would like ot ask you where do I enter this?

          Thanks!

          Comment

          • David Biscan
            New Member
            • Mar 2011
            • 5

            #6
            GOT IT WORKING!

            Thanks Rabbit! Your the man!

            Comment

            Working...