J
J.J.
I have a table that tracks work hours from which I would like to extract the
total number of hours worked per person per asignment based on the work order
(OrderAutoID). I need to know how many hours were spent in the previous
month. While the following query comes up with the correct total, this total
shows repeatedly for each date from the selected month. How do I get just
the one total to display?
SELECT DSum("[NewHoursCompleted]","TrackHours","[OrderAutoID]=" &
[OrderAutoID]) AS MnthSum
FROM TrackHours
WHERE (((DateSerial(Year([date]),Month([date]),Day([date]))) Between
DateSerial(Year(Date()),Month(Date()),1) And
DateSerial(Year(Date()),Month(Date())-1,0)));
Thank you
total number of hours worked per person per asignment based on the work order
(OrderAutoID). I need to know how many hours were spent in the previous
month. While the following query comes up with the correct total, this total
shows repeatedly for each date from the selected month. How do I get just
the one total to display?
SELECT DSum("[NewHoursCompleted]","TrackHours","[OrderAutoID]=" &
[OrderAutoID]) AS MnthSum
FROM TrackHours
WHERE (((DateSerial(Year([date]),Month([date]),Day([date]))) Between
DateSerial(Year(Date()),Month(Date()),1) And
DateSerial(Year(Date()),Month(Date())-1,0)));
Thank you