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
 
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

Top