preload a form

  • Thread starter Thread starter Walter Levine
  • Start date Start date
W

Walter Levine

How can I pre-load an Access form. The on-line docs
refers to placing the line "Load userform2" in the
userform_initialize event.
What is a "userform"? I can't find any reference to it.
Ordinary forms do not seem to have an Initialize event.
I just want to load the form so that I can show or hide
it.
THanks for any help.
Walter
 
This code should work, just substitute frmMainLog with the
name of your form.

This code is in a form that holds two buttons
opening this form loads the target form, the two buttons
then show or hide it

Option Compare Database

Dim frm As Form

Private Sub Command0_Click()
frm.Visible = True
End Sub

Private Sub Command1_Click()
frm.Visible = False
End Sub

Private Sub Form_Load()

Set frm = New Form_frmMainLog
End Sub
 
Back
Top