I am trying to get the code for my form's print button to print a report with the form's current record only. What do I need to do to get it to do this?
Here's my code:
Private Sub cmdPrint_Click()
On Error GoTo Err_cmdPrint_Click
Dim stDocName As String
stDocName = "Agency Acknowledgement"
DoCmd.OpenReport stDocName, acNormal
Exit_cmdPrint_Click:
Exit Sub
Err_cmdPrint_Click:
MsgBox Err.Description
Resume Exit_cmdPrint_Click
End Sub
Here's my code:
Private Sub cmdPrint_Click()
On Error GoTo Err_cmdPrint_Click
Dim stDocName As String
stDocName = "Agency Acknowledgement"
DoCmd.OpenReport stDocName, acNormal
Exit_cmdPrint_Click:
Exit Sub
Err_cmdPrint_Click:
MsgBox Err.Description
Resume Exit_cmdPrint_Click
End Sub