preload a form

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
 
C

chris

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top