Aug 13, 2004 #1 vilmarie Programmer Feb 10, 2004 41 PR How I can to set a button to print a report, or What is the code to send to print a report.
Aug 13, 2004 #2 gwog Technical User Apr 30, 2003 147 US Private Sub BUTTONNAME_Click() On Error GoTo Err_BUTTONNAME_Click Dim stDocName As String stDocName = "REPORTNAME" DoCmd.OpenReport stDocName, acNormal Exit_BUTTONNAME_Click: Exit Sub Err_BUTTONNAME_Click: MsgBox Err.DESCRIPTION Resume Exit_BUTTONNAME_Click End Sub Upvote 0 Downvote
Private Sub BUTTONNAME_Click() On Error GoTo Err_BUTTONNAME_Click Dim stDocName As String stDocName = "REPORTNAME" DoCmd.OpenReport stDocName, acNormal Exit_BUTTONNAME_Click: Exit Sub Err_BUTTONNAME_Click: MsgBox Err.DESCRIPTION Resume Exit_BUTTONNAME_Click End Sub