Hiding a form

G

Guest

Instead of closing a form is there a way I can hide a form or make it
invisible. If so I would like to have this procedure public if possible.
 
G

Graham R Seach

Tru,

Yep, just set its Visible property=False.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
N

Nikos Yannacopoulos

All you need is a line of code like:

Forms("FormName").Visible = False

Or, you can put the following in a general module:

Sub Toggle_Hide_Form(frm As String)
Forms(frm).Visible = Not Forms(frm).Visible
End Sub

so you can call it from anywhere, passing a form name as a parameter (as
a string):

Toggle_Hide_Form("FormName")

and toggle a form's visibility.

HTH,
Nikos
 
G

Guest

THANX AGAIN!

Nikos Yannacopoulos said:
All you need is a line of code like:

Forms("FormName").Visible = False

Or, you can put the following in a general module:

Sub Toggle_Hide_Form(frm As String)
Forms(frm).Visible = Not Forms(frm).Visible
End Sub

so you can call it from anywhere, passing a form name as a parameter (as
a string):

Toggle_Hide_Form("FormName")

and toggle a form's visibility.

HTH,
Nikos
 

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