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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help neede Urgent

Status
Not open for further replies.

mmcg

Programmer
Apr 26, 2002
25
IN

Hi all,
I am using Access database and through VBA Coding I retrieve results of a SQL query into Excel.My problem is when I use a SQL Query with GROUP BY claus I get an error similar to
[Microsoft][ODBC Microsoft Access Driver]You tried to execute a query that does not include the specified expression 'Companyname' as part of an aggregate function.

But the same Query without GROUP BY clause works without any error.I dont know what the problem with GROUP BY clause is.Can someone help me?

And another problem I am facing is with the pivot tables.
When I include a calculated field(unitprice*Quantity) in the data field of the pivot table the total I get is usually greater than expected . That is the the calculated fields are duplicated and the total exceeds what is expected. Can some one help me with this?
 
Hi,

On your PivotTable problem, could it be that you should be using the product of unitprice and the SUM of Quantity??? Skip,
SkipAndMary1017@mindspring.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top