Aggregate Query in Access 2007

R

R Tanner

Hi,

I'm trying to create a simple query to come up with the difference
between two numbers. In the following expression, Limit is a value of
'Number' type in a table and for the sum I am just summing the values
in a table. How can I do this? It keeps telling me 'Cannot have
aggregate function in expression'. I have this query set to a total's
query. Any ideas?


"Pips Available": ([Employee_List]![Limit]-Sum([Transactions].
[Amount]))

By the way, does anyone know why Access differs so much from SQL
Server?? It kind of sucks honestly.
 
R

R Tanner

Hi,

I'm trying to create a simple query to come up with the difference
between two numbers. In the following expression, Limit is a value of
'Number' type in a table and for the sum I am just summing the values
in a table.  How can I do this?  It keeps telling me 'Cannot have
aggregate function in expression'.  I have this query set to a total's
query.  Any ideas?

"Pips Available": ([Employee_List]![Limit]-Sum([Transactions].
[Amount]))

By the way, does anyone know why Access differs so much from SQL
Server??  It kind of sucks honestly.

Nevermind, I solved my problem.

"Pips Available": SUM([Employee_List]!Limit) - SUM([Transactions].
[Amount])
 

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