Проверка - Открыта ли форма?
Private Function IsFormLoaded(sFormName$, Optional blnAnyView As Boolean) As Boolean
On Error GoTo IsFormLoaded_Err
If Forms(sFormName).CurrentView > blnAnyView Then IsFormLoaded = True
IsFormLoaded_Err:
Err.Clear
End Function
В коде:
Const sFormName$ = "Название Вашей Формы"
If CurrentProject.AllForms(sFormName).IsLoaded Then
If CurrentProject.AllForms(sFormName).CurrentView > 0 Then
End If
End If
|