S
sonofroy
I have a query that counts dates in a field
SELECT tblvehicles.[Comm Number], DateValue([CheckOut]) AS Expr1, Count(*)
AS Expr2
FROM tblvehicles LEFT JOIN tbldispatch ON
tblvehicles.VechID=tbldispatch.VechID
WHERE (((tbldispatch.[CheckOut]) Between [Enter Starting date: ] And [Enter
Final date: ]))
GROUP BY tblvehicles.[Comm Number], DateValue([CheckOut]);
The problem is I just found out I am missing some information I
need for it. Some vehicles are checked out for multiple days at a time and I
am using a [CheckOut] date field plus I have an estimated [EstRtn] Date
Field for the return of the vehicle. And I have to show not only the vehicle
the day its checked otu but I need to show a count for each day that vehicle
is out. So if it goes out on a
monday until wednesday I need to show a count of 1 for each of the 3 days
and add it to this query.
Is it possible to add this to query?
SELECT tblvehicles.[Comm Number], DateValue([CheckOut]) AS Expr1, Count(*)
AS Expr2
FROM tblvehicles LEFT JOIN tbldispatch ON
tblvehicles.VechID=tbldispatch.VechID
WHERE (((tbldispatch.[CheckOut]) Between [Enter Starting date: ] And [Enter
Final date: ]))
GROUP BY tblvehicles.[Comm Number], DateValue([CheckOut]);
The problem is I just found out I am missing some information I
need for it. Some vehicles are checked out for multiple days at a time and I
am using a [CheckOut] date field plus I have an estimated [EstRtn] Date
Field for the return of the vehicle. And I have to show not only the vehicle
the day its checked otu but I need to show a count for each day that vehicle
is out. So if it goes out on a
monday until wednesday I need to show a count of 1 for each of the 3 days
and add it to this query.
Is it possible to add this to query?