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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top