Hiding forms

  • Thread starter Thread starter SYChua
  • Start date Start date
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
 
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

How to: Hide the Ribbon When Access Starts 2
Relinking Tables with VBA code 4
dbHiddenObject 8
Delete Tables 2
Hiding and showing Tables 3
ByRef 12
Error with Access Menus 1
Refresh existing link problem. 4

Back
Top