M
Matt
I am trying to place a "print report" button on my forms
so that I can print one record at a time easily (I have
about 1200 entries). Whenever I click on the button, it
tells me "invalid outside procedure." I'm using the
wizard to design the button; what can I do to fix the
problem manually?
Below is the code I copied off of the build event
function behind the button.
Help!
Thanks,
-ME
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
so that I can print one record at a time easily (I have
about 1200 entries). Whenever I click on the button, it
tells me "invalid outside procedure." I'm using the
wizard to design the button; what can I do to fix the
problem manually?
Below is the code I copied off of the build event
function behind the button.
Help!
Thanks,
-ME
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