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

Error regarding GROUP BY clause in subquery

Status
Not open for further replies.

Tennarrow

Technical User
Jul 17, 2003
1
US
I'm receiving a strange error when I try to create a report. The basis of the report is a query that uses several subqueries; I successfully have used this query on previous forms I created. However, whenever I try to use this query with the report, I receive a strange error stating "Multilevel GROUP BY clause not allowed in subquery". I'm very confused by this, because I'm not actually using any GROUP BY clauses. My subqueries all look like this, where IssueType_ID is one example of a field in my query:

IssueType_ID: (SELECT tbl_IssueType.Description FROM tbl_IssueType WHERE tbl_Issuetype.Issuetype_ID = tbl_Issues.IssueType_ID)

As far as I can tell, my subquery is correct. Do reports interpret queries differently than forms? Am I missing something else? Any help would be appreciated.
 
Reports like to rebuild your queries/record sources. I expect you are attempting to sort on the value(s) returned by one or more subquery. Reports won't allow this. Why don't you join tbl_IssueType to your query so you don't need to use a subquery? The other alternative that works (but I hate it) is DLookup() in place of the subquery.

Duane
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top