Disable all open forms

  • Thread starter Thread starter magicdds
  • Start date Start date
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top