I have created a report that does not use the Access 2000 default of 1".
When I call the report from a command button in the form via VBA - for some reason the VBA resets to the 1" margins. What is the syntex that I should use to get the report to maintain the .5" margins?
Any help or suggestions are GREATLY appreciated.
This is what I am using to call the report:
Private Sub cmdPrintEstimate_Click()
On Error GoTo Err_cmdPrintEstimate_Click
Dim stDocName As String
stDocName = "rptEstimate"
'Print rptEstimate report, using qryEstimateFilter query to print Estimate for current record on form.
DoCmd.OpenReport stDocName, acViewNormal, "qryEstimateFilter"
Exit_cmdPrintEstimate_Click:
Exit Sub
Err_cmdPrintEstimate_Click:
'If action was cancelled by the user, don't display an error message.
Const conErrDoCmdCancelled = 2501
If (Err = conErrDoCmdCancelled) Then
Resume Exit_cmdPrintEstimate_Click
Else
MsgBox Err.Description
Resume Exit_cmdPrintEstimate_Click
End If
End Sub
Thanks.
Dawn
dcrosier@nhwichita.com
When I call the report from a command button in the form via VBA - for some reason the VBA resets to the 1" margins. What is the syntex that I should use to get the report to maintain the .5" margins?
Any help or suggestions are GREATLY appreciated.
This is what I am using to call the report:
Private Sub cmdPrintEstimate_Click()
On Error GoTo Err_cmdPrintEstimate_Click
Dim stDocName As String
stDocName = "rptEstimate"
'Print rptEstimate report, using qryEstimateFilter query to print Estimate for current record on form.
DoCmd.OpenReport stDocName, acViewNormal, "qryEstimateFilter"
Exit_cmdPrintEstimate_Click:
Exit Sub
Err_cmdPrintEstimate_Click:
'If action was cancelled by the user, don't display an error message.
Const conErrDoCmdCancelled = 2501
If (Err = conErrDoCmdCancelled) Then
Resume Exit_cmdPrintEstimate_Click
Else
MsgBox Err.Description
Resume Exit_cmdPrintEstimate_Click
End If
End Sub
Thanks.
Dawn
dcrosier@nhwichita.com