form_on_open

  • Thread starter Thread starter annavp
  • Start date Start date
A

annavp

Guest
access goes through the on_open event twice when i start a form for the first time. when i reopen the form afterwords access runs only once through the on open event.

the same happens with on_activate,...

how can i make sure access runs through the vba code only once no matter if its the first or second time??

thanks in advance
 
Stuur mij even een mail in het nederlands
Leg hierin je probleem volledig uit, dan zal ik je trachten te helpen!
 
we seem to have found the problem:
e.g. the following code

(2 buttons on 1 form)

Private Sub Command0_Click()
DoCmd.OpenForm Form_Form1.Name
End Sub

Private Sub Command1_Click()
DoCmd.OpenForm ("form1")
End Sub

(the form1 on open event has a Msgbox)

When you press command0 the msgbox pops up twice. Pressing command1 acts normal.

Strange or not?
 

Users who are viewing this thread

Back
Top Bottom