Function PreviewAndZoomReport(ReportName As String, ZoomCoeff As Integer)
'Автор Radu Lascae <R.Lascae@ind.tno.nl>,
On Error GoTo Error_Handler
If Not (ZoomCoeff >= 0 And ZoomCoeff <= 2500) Then
ZoomCoeff = 0
End If
With DoCmd
.OpenReport ReportName, View:=acViewPreview
.Maximize
End With
Reports(ReportName).ZoomControl = ZoomCoeff
Exit Function
Error_Handler:
MsgBox Err.Description
Resume Next
End Function
|