January 2002
Beginner
576 pages
13h 23m
English
Why do you need to know whether a form is open? If you want to retrieve some data from a form, you might use an expression such as the following:
strState = Forms!LossesArg!AccidentState
The line runs if the form is open. It fails if the form is closed, whether it is a pop-up form or not. Consequently, there are times when you need a way to determine whether the form is loaded. The following procedure determines whether a specific form is loaded in the database:
Function IsFormOpen(frm As String) As Boolean Dim objAccess As AccessObject, dbObject As Object Set dbObject = Application.CurrentProject 'Browse AllForms collection for loaded form For Each objAccess In dbObject.AllForms If objAccess.IsLoaded = ...
Read now
Unlock full access