Error in query

jukus

Registered User.
Local time
Today, 04:21
Joined
Jan 9, 2008
Messages
52
I get an error that states - You tried to execute a query that does not include the specified SellerID as part of an aggregate function.

I have a query that links 2 table (of course tables are a 1 to many relation) where SellerID is primary in tblseller and is a field in tblitems. I am trying to as a function at the end of the query [Total]=Sum([SalePrice]) and I get this error. Not sure what it means or how about getting a the total in the query.

Thanks for any help.
 
I get an error that states - You tried to execute a query that does not include the specified SellerID as part of an aggregate function.

I have a query that links 2 table (of course tables are a 1 to many relation) where SellerID is primary in tblseller and is a field in tblitems. I am trying to as a function at the end of the query [Total]=Sum([SalePrice]) and I get this error. Not sure what it means or how about getting a the total in the query.

Thanks for any help.

Without seeing the query, I can only give a broad description of what to look for.

I will imagine that your Query must be similar to the Following:
Select tblitems.Item, tblseller.SellerID, Sum(tblitems.SalePrice)
From tblItems Inner Join tblSellers On tblitems.SellerID = tblseller.SellerID
Group By tblitems.Item
This case will create the error that you have, becasue the Group By Clause needs to contain each Column that is being summed. Adding tblseller.SellerID to the Group By Statement, should eliminate the error and might give you what you are looking for.
 

Users who are viewing this thread

Back
Top Bottom