Print Report from form without opening Report (1 Viewer)

JayAndy

Registered User.
Local time
Today, 23:43
Joined
Jan 13, 2016
Messages
31
Hi

I am trying to click a button on the form that Prints a Report without opening.

Below is what l have in the On Click Sub

DoCmd.OpenReport "Imports", acViewNormal
DoCmd.PrintOut acPrintAll
DoCmd.Close acReport, "Imports", acSaveNo

It works but also prints the form too, Does anyone know why and how to stop it printing the form the buttons on.

Thanks

Jay
 

JayAndy

Registered User.
Local time
Today, 23:43
Joined
Jan 13, 2016
Messages
31
Thanks tried that but still print the form
 

Minty

AWF VIP
Local time
Today, 23:43
Joined
Jul 26, 2013
Messages
10,355
Did you remove the line;
DoCmd.PrintOut acPrintAll

You won't need it.
 

Users who are viewing this thread

Top Bottom