If IsOpened

  • Thread starter samotek via AccessMonster.com
  • Start date
S

samotek via AccessMonster.com

I want to build a common function that is functioning when a certain form is
opened and nothing happens when such a form is not opened.I presume I must
use the line If ISOpened but I cannot do it properly.Could you help me ?

Public Function MyBack()
If IsOpened Forms!frmClients Then
Forms!frmClients![Registered] = ""
DoCmd.Close acForm, "frmClientsâ€
Else If
Forms!frmCustomers Then
Forms!frmCustomers!Registered = “â€
DoCmd.Close acForm, "frmCustomersâ€
Else If
Forms!Orders! Then
Forms!Orders!Registered = “â€
DoCmd.Close acForm, "Ordersâ€
End If

End Function
 
S

Stefan Hoffmann

hi,
I want to build a common function that is functioning when a certain form is
opened and nothing happens when such a form is not opened.I presume I must
use the line If ISOpened but I cannot do it properly.Could you help me ?
Take a look at

AllForms.Item("yourFormname").IsLoaded

in the OH.


mfG
--> stefan <--
 

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

Top