Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7853819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:48:54+00:00 2026-06-02T19:48:54+00:00

I have a query as follows in MS Access SELECT tblUsers.Forename, tblUsers.Surname, (SELECT COUNT(ID)

  • 0

I have a query as follows in MS Access

SELECT tblUsers.Forename, tblUsers.Surname, 
  (SELECT COUNT(ID) 
     FROM tblGrades 
     WHERE UserID = tblUsers.UserID 
     AND (Grade = 'A' OR Grade = 'B' OR Grade = 'C')) AS TotalGrades
FROM tblUsers

I’ve put this into a report and now when trying to view the report it displays an alert “Multi-level GROUP BY clause is not allowed in subquery“

What I dont get is I dont even have any GROUP BY clauses in the query so why is it returning this error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:48:56+00:00Added an answer on June 2, 2026 at 7:48 pm

    From Allen Browne’s excellent website of Access tips: Surviving Subqueries

    Error: “Multi-level group by not allowed”

    You spent half an hour building a query with subquery, and verifying it all works. You create a report based on the query, and immediately it fails. Why?

    The problem arises from what Access does behind the scenes in response to the report’s Sorting and Grouping or aggregation. If it must aggregate the data for the report, and that’s the “multi-level” grouping that is not permitted.

    Solutions

    • In report design, remove everything form the Sorting and Grouping dialog, and do not try to sum anything in the Report Header or Report Footer. (In most cases this is not a practical solution.)

    • In query design, uncheck the Show box under the subquery. (This solution is practical only if you do not need to show the results of the subquery in the report.)

    • Create a separate query that handles the subquery. Use this query as a source “table” for the query the report is based on. Moving the subquery to the lower level query sometimes (not always) avoids the problem, even if the second query is as simple as

      SELECT * FROM Query1;

    • Use a domain aggregate function such as DSum() instead of a subquery. While this is fine for small tables, performance will be unusable for large ones.

    • If nothing else works, create a temporary table to hold the data for the report. You can convert your query into an Append query (Append on Query menu in query design) to populate the temporary table, and then base the report on the temporary table.

    IMPORTANT NOTE: I’m reposting the info here because I believe Allen Browne explicitly allows it. From his website:

    Permission
    You may freely use anything (code, forms, algorithms, …) from these articles and sample databases for any purpose (personal, educational, commercial, resale, …). All we ask is that you acknowledge this website in your code, with comments such as:
    ‘Source: http://allenbrowne.com
    ‘Adapted from: http://allenbrowne.com

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a query as follows; SELECT COUNT(Id) FROM Table The table contains 33
I have the cursor with the query statement as follows: cursor.execute(select rowid from components
I have an Ms Access view(query) as following select * from employee Where EmployeeId=SomeID
I have a mysql problem, my query looks as follows but not complete SELECT
I have query like this : SELECT EXTRACT(MONTH FROM d.mydate) AS synmonth, SUM(apcp) AS
Fellows, I have a query as follows: SELECT A.ID, B.ID, (HUGE SUBQUERY) as HS
I have this query, which was working fine. SELECT SUM(amount) FROM company.invoice_line WHERE item_id
I have a query as follows: String SQL = insert into table (id, name)
i have small query as follows: If i will make view state property of
I have a sql query as follows: Declare @DivisionNo INT SET @DivisionNo = 5117

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.