SmokinWrek
IS-IT--Management
I don't work much in Access, but I have written SQL statements before for my VB programs. I am currently trying to write a query in Access, but am coming up with an error I don't quite understand, and of course, help is of no help at all.
Here's my query:
The error I get is:
"You tried to execute a query that does not include the specified expression 'ClientID' as part of an aggregate."
Can anyone help me? I don't understand why ClientID would have to be part of an aggregate!?
Kevin
Here's my query:
Code:
SELECT i.ClientID, SUM(d.Peices) AS Qty, d.Region
FROM JobDetail AS d INNER JOIN [SELECT ClientID, JobID
FROM JobInfo AS j
WHERE ((j.JobDate)>=#5/1/2007#) And ((j.JobDate)<=#5/30/2007#)]. AS i ON d.JobID=i.JobID
ORDER BY i.ClientID, d.Region;
The error I get is:
"You tried to execute a query that does not include the specified expression 'ClientID' as part of an aggregate."
Can anyone help me? I don't understand why ClientID would have to be part of an aggregate!?
Kevin