The query is working well:
SELECT Students.StudentId, Students.[First Name], Students.[Last Name], [Forms]![Print Menu]![SchoolYear] AS SchoolYear
FROM Students
WHERE (((Students.StudentId) Not In (Select ID from [Grade Level] where [Grade Level].[School Year] =[Forms]![Print Menu]![SchoolYear])));
but I am having a confusing time with the report I have made based on the query. The report is generated through my Print Menu Form with this code:
DoCmd.OpenReport [ReportName], acViewPreview, , "[School Year] = '" & Me.SchoolYear & "'"
I have several reports based on school year working fine through this command.
When I run the query stand alone, or the report through the Print Menu, I am prompted for "School Year" - however, if I have the Print Menu open and the School Year field filled in, I can run the query and the report stand alone and not be prompted for the data. This is really confusing me because I know from the results that the query is getting the parameter correctly from the object in the form, except when I run it through the form! Any wisdom is appreciated.