N
news.microsoft.com
Hi I want to be able to hide all forms, reports and queries from the
database using code
How can I do this?
database using code
How can I do this?
news.microsoft.com said:Hi I want to be able to hide all forms, reports and queries from the
database using code
How can I do this?
Dirk Goldgar said: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)