Does not include the specified expression as part of an aggregatefunction

B

Beejer

Running Access 2003 on Windows XP

I'm starting a new structure parallel to a current database. The table
are fully linked (no local tables) and I'm trying to create a simple
query and I keep getting this message.

The current query has one table to it, the general idea is to
calculate consumption of raw materials in production.

Fields:
- Product Code (Text) // These are alphanumeric codes.
- Inventory deductions // Numeric

I'm trying to sum, min and max the deductions. My formula : "Total :
Sum([Inventory deductions]) // Low : Min([Inventory deductions]) //
High : Max([Inventory deductions])

When I try to run the query, "Does not include the specified
expression as part of an aggregate function" pops up. I never had this
issue before.

Anybody can enlighten me on what is going on?
 
B

Beejer

Running Access 2003 on Windows XP

I'm starting a new structure parallel to a current database. The table
are fully linked (no local tables) and I'm trying to create a simple
query and I keep getting this message.

The current query has one table to it, the general idea is to
calculate consumption of raw materials in production.

Fields:
- Product Code (Text) // These are alphanumeric codes.
- Inventory deductions // Numeric

I'm trying to sum, min and max the deductions. My formula : "Total :
Sum([Inventory deductions]) // Low : Min([Inventory deductions]) //
High : Max([Inventory deductions])

When I try to run the query, "Does not include the specified
expression as part of an aggregate function" pops up. I never had this
issue before.

Anybody can enlighten me on what is going on?

I was getting so desperate when I posted this, nothing was working...
so I got up and walk to coffee machine and back... found my mistake.

Solution was pretty simple that I couldn't even see it. I removed "
Inventory deductions" for the query to concentrate on "Product code".
Grouped "Product Code" only with the Group by feature and ran the
query with only the sum expression ** not grouped** and no message.

I will push this further... and sorry for not signing earlier.

Beejer
 
J

Jerry Whittle

Show us the SQL. Open the query in design view. Next go to View, SQL View
and copy and past it here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top