|
|
Изменение свойств всех отчетов приложения
Private Sub ChangeReportsPrp()
Dim dbs As Database, objContainer As Container, objDoc As Report, objReport As Report, sRepName$
On Error GoTo ChangeReports_Err
Set dbs = CurrentDb
Set objContainer = dbs.Containers!Reports
For Each objDoc In objContainer.Documents
sRepName = objDoc.Name
DoCmd.OpenReport sRepName, acViewDesign
Set objReport = Reports(sRepName)
SysCmd acSysCmdSetStatus, "Обрабатываю Отчет: " & sRepName & " ..."
With objReport
.PopUp = True
End With
DoCmd.Close acReport, sRepName, acSaveYes
Next objDoc
ChangeReports_End:
SysCmd acSysCmdClearStatus
On Error Resume Next
Set objReport = Nothing
Set objContainer = Nothing
Err.Clear
Exit Sub
Exit Sub
ChangeReports_Err:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in Sub : " & _
"ChangeReports." & vbCrLf & "При обработке Отчета: [" & sRepName & "]", vbCritical, "Error!"
Resume ChangeReports_End
End Sub
|
|