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!

Multi-Level Group by clause not allowed in subquery error?

Status
Not open for further replies.

rt52

Technical User
Jan 26, 2003
39
US
Given the sql statement:

rptSQL = "SELECT [tbIntervention].[loc], " & _
"Count([tbIntervention].[loc]) AS [Number], " & _
"Count([tbIntervention].[loc])/" & _
"(Select Count([tbIntervention].[loc]) " & _
"FROM tbIntervention WHERE " & _
dateSQL & " AND " & cboSQL & ") AS [percent] " & _
"FROM tbIntervention "
The report has a loc group, number and percent fields in detail, and sum(number) and sum(percent) in report footer.

What does the error mean?
 
Hello.
This is the first part of a longer sql. datesql and combo sql comprise the "where" statement - both are derived from combobox choices. This sql statement worked until I added the "Count([tbIntervention].[loc])/" & _
"(Select Count([tbIntervention].[loc]) "
part, and placed [percent] in a field on the report. This thread is actually a secondary issue of thread 701-938950.
Thanks for looking.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top