showing avaliable vehicles by dates

stu_c

Registered User.
Local time
Today, 23:15
Joined
Sep 20, 2007
Messages
494
hi all
ill try and explain my problem, we have vehicles which are lent out to employees on a daily basis,

I currently have a query shown as a report which vehicles are out between the given dates using this criteria in a query

>=[ENTER Start Date] And <=[Enter End Date]

what I want to be able to do is show which vehicles are NOT being used between these dates tried a few different ways but no success :(
 
Try using NOT infront.
If that doesn't work you could easily say <= [start date] Or >= [End date]
 
Try using NOT infront.
If that doesn't work you could easily say <= [start date] Or >= [End date]

i tried both these but it doesnt give the results I wanted
for example

Booking
CAR 1
11/11/2012
05/02/2013
01/03/2013
25/03/2013

CAR 2
12/12/2012
05/02/2013
05/03/2013
24/03/2013

CAR 3
05/12/2012


if I do a date search by typing in a start and end date for example 01/01/2013 - 25/03/2013
using the code <= [start date] Or >= [End date]

all it does is show the dates thats not between these two dates, what I want to do is show the avaliabkle cars thats not got any bookings between these dates E.g. CAR 3
 
You didn't really explain that. Can you show what your tables look like.
 
thye are in two tables

TABLE CAR DETAILS
**Fields**
CarID (Autonumber)
Car Make
Car Model
Car Reg
Car Colour
Car Fuel Type

TABLE BOOKING DETAILS
**Fields**
BookingID (Autonumber)
Booking Date
Persons First Name
Persons Surname

I have a form and subform witht he vehicle details in the top them a subform containing the booking details
 
What if the car has no booking at all?
I'm not sure the best way to go about this but what I would do is create an expression field in the query which will return either 1 or 0 for each record.
1 if the car is booked within the date and 0 otherwise.
Add all the fields up for each car and if the end result is 0 display the car name.
Probably an easier way though. :)
 

Users who are viewing this thread

Back
Top Bottom