Hiding forms


S

SYChua

Hi,
Is any anyway to hide all the forms in a database which is much like
the hidden tables as show below.
Set db = CurrentDb
For i = db.TableDefs.Count - 1 To 0 Step -1
db.TableDefs(i).Properties("Attributes").Value = dbHiddenObject
Next

Thanks
 
Ad

Advertisements

K

Ken Snell \(MVP\)

This code snippet loops through the AllForms collection and sets the Hidden
attribute to True.

Dim lngLoop As Long
For lngLoop = 0 To Application.CurrentProject.AllForms.Count - 1
Application.SetHiddenAttribute acForm, _
Application.CurrentProject.AllForms(lngLoop).Name, True
Next lngLoop


To reverse the process:

Dim lngLoop As Long
For lngLoop = 0 To Application.CurrentProject.AllForms.Count - 1
Application.SetHiddenAttribute acForm, _
Application.CurrentProject.AllForms(lngLoop).Name, False
Next lngLoop
 

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

Similar Threads

hide a form 1
Hiding a form 3
Hide a form 1
Form hide or close 0
Form Hide / Unhide 3
hiding controls on a form 1
hiding options on forms 4
about the hiding of forms 1

Top