I have the following code to print a report....i would like to add code to set the orientation and margins....for some reason it's not keeping what i had when i save the report so i figure if i code it then there shouldn't be an issue...any help would be great....
[/code]
Code:
Function PrintReport()
On Error GoTo PrintReport_Err
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryModelsElevations", acNormal, acEdit
DoCmd.OpenQuery "qryModelsOptions", acNormal, acEdit
DoCmd.OpenQuery "qryTempGroupElevations", acNormal, acEdit
DoCmd.OpenQuery "qryTempGroupOptions", acNormal, acEdit
DoCmd.OpenReport "rptOrderConfig", acPreview, "", ""
PrintReport_Exit:
Exit Function
PrintReport_Err:
MsgBox Error$
Resume PrintReport_Exit
End Function
Private Sub cmdPrintReport_Click()
PrintReport
DoCmd.SetWarnings True
End Sub