View Full Version : form_on_open


annavp
05-15-2001, 02:35 AM
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

Johan
05-15-2001, 06:29 AM
Stuur mij even een mail in het nederlands
Leg hierin je probleem volledig uit, dan zal ik je trachten te helpen!

annavp
05-17-2001, 03:33 AM
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?