print report button

  • Thread starter Thread starter Matt Edwards
  • Start date Start date
M

Matt Edwards

I am trying to install a "print report" button on my
forms so that I can print reports from the form without
having to search for the right page in the reports view
(I have about 1200 records).

I used the design wizard to place the button, but when I
hit the button it produces an "invalid outside procedure"
error.

What's happening, and how can I fix it?

-ME
 
Hey Jesse. Here is the code that I copied off of the
build event screen:

Me.Refresh
DoCmd.OpenReport "Potential Donors", acViewPreview, , "id
= " & Me.id
Private Sub Call_Sheet_Button_Click()
On Error GoTo Err_Call_Sheet_Button_Click

Dim stDocName As String

stDocName = "Potential Donors"
DoCmd.OpenReport stDocName, acNormal

Exit_Call_Sheet_Button_Click:
Exit Sub

Err_Call_Sheet_Button_Click:
MsgBox Err.Description
Resume Exit_Call_Sheet_Button_Click

End Sub
Private Sub Command72_Click()
On Error GoTo Err_Command72_Click

Dim stDocName As String

stDocName = "Potential Donors"
DoCmd.OpenReport stDocName, acNormal

Exit_Command72_Click:
Exit Sub



Thanks for your help!

-ME
 
Back
Top