form_on_open (2 Viewers)

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
 

Johan

Registered User.
Local time
Today, 08:28
Joined
Apr 13, 2001
Messages
12
Stuur mij even een mail in het nederlands
Leg hierin je probleem volledig uit, dan zal ik je trachten te helpen!
 
A

annavp

Guest
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

Top Bottom