I'm trying to open a report with 2 criteria on one control, with no luck.
Here is the code:
Private Sub cmdPrintOpen_Click()
Dim x As String
Dim y As String
x = "Not Approved"
y = "Make Corrections Noted"
DoCmd.OpenReport "rptSubmittals", acViewPreview, , "[Job] = '" & Me![Job] & "' AND [Status] = '" & x & "' AND [Status] = '" & y & "'"
End Sub
I've got it to work with either the x or y value, but can't get it to work with both.
What is the syntax?
Here is the code:
Private Sub cmdPrintOpen_Click()
Dim x As String
Dim y As String
x = "Not Approved"
y = "Make Corrections Noted"
DoCmd.OpenReport "rptSubmittals", acViewPreview, , "[Job] = '" & Me![Job] & "' AND [Status] = '" & x & "' AND [Status] = '" & y & "'"
End Sub
I've got it to work with either the x or y value, but can't get it to work with both.
What is the syntax?