If IsOpened

  • Thread starter Thread starter samotek via AccessMonster.com
  • Start date 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
 
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 <--
 
Back
Top