Public Sub HideUnhide(blHidden As Boolean)
Dim i As Integer, db As DAO.Database
Set db = CurrentDb
With db.Containers("Forms")
For i = 0 To .Documents.Count - 1
If .Documents(i).Name <> "Switchboard" Then
Application.SetHiddenAttribute acForm, .Documents(i).Name, blHidden
End If
Next
End With
With db.Containers("Modules")
For i = 0 To .Documents.Count - 1
Application.SetHiddenAttribute acModule, .Documents(i).Name, blHidden
Next
End With
With db.Containers("Tables")
For i = 0 To .Documents.Count - 1
If .Documents(i).Name Like "msys*" Or .Documents(i).Name Like "~*" Then
Else
Application.SetHiddenAttribute acTable, .Documents(i).Name, blHidden
End If
Next
End With
With db.Containers("Queries")
For i = 0 To .Documents.Count - 1
Application.SetHiddenAttribute acQuery, .Documents(i).Name, blHidden
Next
End With
End Sub
|