I wonder if I can put a codeline into the regular printreport code that specifies that the report has to be previewed and printed always in layout page setup. I have to keep changing the page setup of the report manually through the file menu and it has become a big hassle. Somehow the format always changes in my database, although it should be stored according to microsoft online. I tried to find help in the VB library, but unsuccessful so far..
Private Sub PrintReport_Click()
On Error GoTo Err_PrintReport_Click
Dim stDocName As String
stDocName = "rpt"
DoCmd.OpenReport stDocName, acNormal
Exit_PrintReport_Click:
Exit Sub
Err_PrintReport_Click:
MsgBox Err.Description
Resume Exit_PrintReport_Click
End Sub
Thanks for your help.
Maddi
Private Sub PrintReport_Click()
On Error GoTo Err_PrintReport_Click
Dim stDocName As String
stDocName = "rpt"
DoCmd.OpenReport stDocName, acNormal
Exit_PrintReport_Click:
Exit Sub
Err_PrintReport_Click:
MsgBox Err.Description
Resume Exit_PrintReport_Click
End Sub
Thanks for your help.
Maddi