You need a left join but I am not sure which query is summing your time.
Try this ---
SELECT qryWorkOrder7.TimeSpent, [Clients Vents].VentName, Clients.ClientID,
Clients.ClientFirstName, Clients.ClientLastName, Clients.City,
HealthRegion.HealthRegionName, qryWorkOrder7.WorkorderID,
qryWorkOrder7.EmployeeID, qryWorkOrder7.DatePerformed,
tblWOCategories.Description
FROM (((tblWOCategories INNER JOIN qryWorkOrder7 ON tblWOCategories.ID =
qryWorkOrder7.CategoryID) INNER JOIN ((HealthRegion INNER JOIN Clients ON
HealthRegion.HealthRegionID = Clients.HealthRegions) INNER JOIN Departments
ON Clients.DepartmentID = Departments.DepartmentID) ON qryWorkOrder7.ClientID
= Clients.ClientID) INNER JOIN [Clients Vents] ON Clients.Vent = [Clients
Vents].VentID) LEFT JOIN qryTotalTimeSpent ON Clients.ClientID =
qryTotalTimeSpent.ClientID
WHERE (((qryWorkOrder7.DatePerformed) Between Date()-365 And Date()) AND
((Departments.DepartmentName)="PROP" Or (Departments.DepartmentName)="Both"));
If this does not work then probably this --
qryWorkOrder7 LEFT JOIN tblWOCategories
When seen in design view the left joins (arrow pointing to the right) must
be to the left of inner joins (no arrow heads).
--
KARL DEWEY
Build a little - Test a little
Anne said:
SELECT qryWorkOrder7.TimeSpent, [Clients Vents].VentName, Clients.ClientID,
Clients.ClientFirstName, Clients.ClientLastName, Clients.City,
HealthRegion.HealthRegionName, qryWorkOrder7.WorkorderID,
qryWorkOrder7.EmployeeID, qryWorkOrder7.DatePerformed,
tblWOCategories.Description
FROM (((tblWOCategories INNER JOIN qryWorkOrder7 ON tblWOCategories.ID =
qryWorkOrder7.CategoryID) INNER JOIN ((HealthRegion INNER JOIN Clients ON
HealthRegion.HealthRegionID = Clients.HealthRegions) INNER JOIN Departments
ON Clients.DepartmentID = Departments.DepartmentID) ON qryWorkOrder7.ClientID
= Clients.ClientID) INNER JOIN [Clients Vents] ON Clients.Vent = [Clients
Vents].VentID) INNER JOIN qryTotalTimeSpent ON Clients.ClientID =
qryTotalTimeSpent.ClientID
WHERE (((qryWorkOrder7.DatePerformed) Between Date()-365 And Date()) AND
((Departments.DepartmentName)="PROP" Or (Departments.DepartmentName)="Both"));
Thanks, here it is.
--
Anne
John W. Vinson said:
I'm getting closer. The Time Spent query works fine, however my original
query is looking at services performed in the last calendar year. The Time
Spent query totals the time spent for all of the services performed
regardless of the time period. If add my time restriction to the last
calendar year in my Time Spent query it then just totals each service instead
of all the services for the year. I have tried changing how my query's link
but so far I haven't had any luck.
Please open the query in SQL view and post the SQL text here. Karl or another
volunteer will be able to help you straighten it up.