The VBA code to print out an access report is printing the report and the form where the button to print the report is. Below is the code:
Code:
Private Sub Command2_Click()
DoCmd.OpenReport "Needed Stock", acViewNormal, , "[PLocation] =" & Chr(34) & Me.Combo0.Column(1) & Chr(34), acDialog
DoCmd.Close acForm, "StockNeeds", acSaveNo
DoCmd.PrintOut
DoCmd.Close acReport, "Needed Stock", acSaveNo
End Sub
I have it set up to:
1.) Open the form and filter results
2.) Close Form where button is
3.) Print out report
4.) Close the report
But I'm getting the report and the form printing out. any suggestions?
Thanks Again
Zook