In Access 2002 or later -- and maybe Access 2000, I'm not sure -- this
should work:
Dim ao As AccessObject
For Each ao In CurrentProject.AllForms
Application.SetHiddenAttribute acForm, ao.Name, True
Next ao
For Each ao In CurrentProject.AllReports
Application.SetHiddenAttribute acReport ao.Name, True
Next ao
For Each ao In CurrentData.AllQueries
If Left(ao.Name, 3) <> "~sq" Then
Application.SetHiddenAttribute acQuery, ao.Name, True
End If
Next ao
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)