Query: Agregate Function Error

psycoperl

Active Member
Joined
Oct 23, 2007
Messages
338
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
  3. Web
Hi All , I have the following query and I am receiving the following error: "You tried to execute a query that does not include the specified expression 'qryRPT_FullRoster_Status_TestDate.[ATBMet?]="Yes" as part of an aggregate function.

I am unable to see where the problem is nor how to solve this... can you please provide guidance

Code:
SELECT [qryRPT_FullRoster_Status_TestDate].[StuLastName] & ", " & [qryRPT_FullRoster_Status_TestDate].[StuFirstName] AS [Report Name], 
  qryMaxReading.TestDate AS [RA Date], 
  qryMaxReading.Score AS [RA Score], 
  qryMaxReading.RaMet AS [RA Met], 
  qryMaxWriting.TestDate AS [WO Date], 
  qryMaxWriting.Score AS [WO Score], 
  qryMaxWriting.WoMet AS [WO Met], 
  qryMaxMath.TestDate AS [MA Date], 
  qryMaxMath.M1Score AS [M1 Score], 
  qryMaxMath.MaMet AS [MA Met], 
  qryRPT_FullRoster_Status_TestDate.[ATBMet?], 
  qryRPT_FullRoster_Status_TestDate.SSN4, 
  qryRPT_FullRoster_Status_TestDate.StudentID
FROM 
 ((qryRPT_FullRoster_Status_TestDate LEFT JOIN qryMaxMath ON qryRPT_FullRoster_Status_TestDate.StudentID = qryMaxMath.StudentID) 
    LEFT JOIN qryMaxReading ON qryRPT_FullRoster_Status_TestDate.StudentID = qryMaxReading.StudentID) 
    LEFT JOIN qryMaxWriting ON qryRPT_FullRoster_Status_TestDate.StudentID = qryMaxWriting.StudentID
GROUP BY 
  [qryRPT_FullRoster_Status_TestDate].[StuLastName] & ", " & [qryRPT_FullRoster_Status_TestDate].[StuFirstName],  
  qryMaxReading.TestDate, 
  qryMaxReading.Score, 
  qryMaxReading.RaMet, 
  qryMaxWriting.TestDate, 
  qryMaxWriting.Score, 
  qryMaxWriting.WoMet, 
  qryMaxMath.TestDate, 
  qryMaxMath.M1Score, 
  qryMaxMath.MaMet, 
  qryRPT_FullRoster_Status_TestDate.[ATBMet?], 
  qryRPT_FullRoster_Status_TestDate.SSN4, 
  qryRPT_FullRoster_Status_TestDate.StudentID, 
  qryRPT_FullRoster_Status_TestDate.StuLastName, 
  qryRPT_FullRoster_Status_TestDate.StuFirstName
HAVING 
  (((qryRPT_FullRoster_Status_TestDate.[ATBMet?])="Yes"))
ORDER BY 
  qryRPT_FullRoster_Status_TestDate.[ATBMet?], 
  qryRPT_FullRoster_Status_TestDate.StuLastName, 
  qryRPT_FullRoster_Status_TestDate.StuFirstName, 
  qryRPT_FullRoster_Status_TestDate.SSN4;
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top