I have a report that is supposed to show the teachers that have taught specific classes this year. I'm almost done, I just need the report to filter the data before opening.
In setting the button that opens the report to filter the data I'm being asked for input for my Fall, Spring, and Summer... which shouldn't happen. If I add a single quote to those terms, I no longer am prompted for input, but am told that my expression is too complex.
I'm not seeing what I'm doing wrong with my code. Any help is appreciated.
Expand|Select|Wrap|Line Numbers
- pyer = ([Forms]![MENMain3]![NavigationSubform].[Form]![SYr]) - 1
- yer = [Forms]![MENMain3]![NavigationSubform].[Form]![SYr]
- nyer = ([Forms]![MENMain3]![NavigationSubform].[Form]![SYr]) + 1
- DoCmd.OpenReport "QuickScheduleCourse", acPreview, , "[SemesterYear]=" & ((pyer & " Or " & yer & " Or " & nyer) & " AND " & "[Semester]=" & "Fall") & " or " & "[SemesterYear]=" & ((pyer & " Or " & yer & " Or " & nyer) & " AND " & "[Semester]=" & "Spring") & " or " & "[SemesterYear]=" & ((pyer & " Or " & yer & " Or " & nyer) & " AND " & "[Semester]=" & "Summer")