I'm trying to filter out a report to just give me one record...
I'm testing my code using a command button. When I press the button, the
report still gives me every record. What am I doing wrong?
Private Sub Command0_Click()
EPR = CStr(95) '95 is the PKID of the coversheets underlying
msgResponse = MsgBox("Print an EPR Coversheet?" & vbCrLf & vbCrLf & " ",
vbYesNo, "EPR Coversheet")
If msgResponse = 6 Then
Function Print_Cover_Sheet(x As String)
On Error GoTo Err_Print_Cover_Sheet
Dim stDocName2 As String
stDocName2 = "rptCoverSheet2"
DoCmd.OpenReport stDocName2, acPreview, "tblEPR.PKID =" + x