Disable all open forms

M

magicdds

Is there a way , from a command button if FORM1, to check which other forms
are open, and set the ENABLED property of each of those forms to NO?

Thanks
Mark
 
D

Dirk Goldgar

magicdds said:
Is there a way , from a command button if FORM1, to check which other
forms
are open, and set the ENABLED property of each of those forms to NO?


It's easy enough to loop through all open forms:

Dim frm As Access.Form

For Each frm in Forms

' skip over the current form.
If frm.Name <> Me.Name Then

' do something ... but what?

End If

Next frm

But forms don't have an Enabled property, so I don't know what it is you
want to do.
 
Top