Print report from control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to print a report from a button in a form.

I have the following code which doesn't work. It says that the types do not
match, in the line Set... (err. number 13). What am I doing wrong?

Private Sub btn_Print_Click()
Dim printRep As Report
Set printRep = Application.CurrentProject.AllReports.Item("rpt_Kaart")
printRep.PrintOut
End Sub
 
Back
Top