Form Load

07-23-2002, 07:55 AM
Why is it that form_load() only works the VERY first time you load that form. If i close and then re-open it doesn't run through that function again. i need something that will execute EVERY time i open the form. Any ideas?

Road Runner
07-23-2002, 08:02 AM
Private Sub Form_Activate()

End Sub

07-23-2002, 08:04 AM
It does work every time you load the form, I suspect that you are just hiding it instead of unloading it fully (either by doing a <formname>.hide , or by having some code still running).

If you unload the form fully it should be fine.

07-23-2002, 08:41 AM
In other words this is probably what your doing.

Private Sub Command1_Click()
End Sub

But you should be doing this.

Private Sub Command1_Click()
Unload Frm1
End Sub

07-23-2002, 08:57 AM
To Unload Form Use:

Unload Me 'This will unload the form properly

And to load and display the form again use:

Load FormName 'Load's the form
FormName.Show 'Display's the form

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum