Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-Time error 3122 1

Status
Not open for further replies.

Brianus

Programmer
Jul 5, 2006
11
US
In VBA, I tried to execute the code below:

SELECT Projid, projstatus, projdescription, Sum(tothrs) FROM Timesheettbl
GROUP BY Projid;

And I get the following error message:
You tried to execute a query without including Projstatus as an aggregage function.

How can I solve this problem?
Thank you all for any help.
Brianus.
 
Hi!

Like this:

SELECT Projid, projstatus, projdescription, Sum(tothrs) FROM Timesheettbl
GROUP BY Projid, projstatus, projdescription;

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top