I am tring to create a report with multiple criterias from a form. I have tried this code but keep getting a " missing operator error" with can someone show me where iam going wrong?
Private Sub Command7_Click()
On Error GoTo Err_Command7_Click
Dim stDocName As String
Dim stLinkCriteria As String
stLinkCriteria = "[Class]=" & Me![Class] & " AND [Manager]= " & Me![Manager]
stDocName = "rptExamsavg"
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
Exit_Command7_Click:
Exit Sub
Err_Command7_Click:
MsgBox Err.Description
Resume Exit_Command7_Click
End Sub
Private Sub Command7_Click()
On Error GoTo Err_Command7_Click
Dim stDocName As String
Dim stLinkCriteria As String
stLinkCriteria = "[Class]=" & Me![Class] & " AND [Manager]= " & Me![Manager]
stDocName = "rptExamsavg"
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
Exit_Command7_Click:
Exit Sub
Err_Command7_Click:
MsgBox Err.Description
Resume Exit_Command7_Click
End Sub