By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,510 Members | 1,504 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,510 IT Pros & Developers. It's quick & easy.

aggregate function error

P: 3
Hello,

I'm using Access on XP and I am trying to count the number of cases in a Table via a query using two criteria. The criteria are being drawn from two different tables. I keep getting an aggregate function error message. My SQL looks like this:

SELECT Count(*) AS Expr1, [General Project Information].Region, Stipulations.[Stipulation status]
FROM [General Project Information] INNER JOIN Stipulations ON [General Project Information].[Project Identification Number] = Stipulations.[Project Identification Number]
WHERE ((([General Project Information].Region)="North Central") AND ((Stipulations.[Stipulation status])="Yes"));

I'm an inexperienced user, so I apologize for the simplicity of the question. Any and all info would be greatly appreciated!
Sep 19 '07 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 296
Hello,

I'm using Access on XP and I am trying to count the number of cases in a Table via a query using two criteria. The criteria are being drawn from two different tables. I keep getting an aggregate function error message. My SQL looks like this:

SELECT Count(*) AS Expr1, [General Project Information].Region, Stipulations.[Stipulation status]
FROM [General Project Information] INNER JOIN Stipulations ON [General Project Information].[Project Identification Number] = Stipulations.[Project Identification Number]
WHERE ((([General Project Information].Region)="North Central") AND ((Stipulations.[Stipulation status])="Yes"));

I'm an inexperienced user, so I apologize for the simplicity of the question. Any and all info would be greatly appreciated!
In your query design view, right click the grid and click Totals. This will add a new row to the grid and should be filled in with Group By for all fields except your count. This should get rid of your aggregate function error message.
Sep 19 '07 #2

P: 3
In your query design view, right click the grid and click Totals. This will add a new row to the grid and should be filled in with Group By for all fields except your count. This should get rid of your aggregate function error message.
That worked! Thanks!
Sep 24 '07 #3

Expert 100+
P: 296
That worked! Thanks!
Glad you got it to work!
Sep 24 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.