I'm looking for an easy way to hide all the objects in a database without having to do each one individualy through their properties menu. I found an earlier post which suggested the following code:
dim frm as object
for each frm in currentproject.allforms
application.sethiddenattribute acform,frm.name,true
next frm
I tried this and it worked great for the forms, reports and macros. But I can't get it to work on the tables or queries. Here is what I have for these:
Dim tbl As Object
For Each tbl In CurrentProject.AllTables
Application.SetHiddenAttribute acTable, tbl.Name, True
Next tbl
and
Dim qry As Object
For Each qry In CurrentProject.AllQueries
Application.SetHiddenAttribute acQuery, qry.Name, True
Next qry
Can anyone tell me why this won't work for the tables and queries, and hopefully also tell me how to get it to work?
Thanks!
Paul
dim frm as object
for each frm in currentproject.allforms
application.sethiddenattribute acform,frm.name,true
next frm
I tried this and it worked great for the forms, reports and macros. But I can't get it to work on the tables or queries. Here is what I have for these:
Dim tbl As Object
For Each tbl In CurrentProject.AllTables
Application.SetHiddenAttribute acTable, tbl.Name, True
Next tbl
and
Dim qry As Object
For Each qry In CurrentProject.AllQueries
Application.SetHiddenAttribute acQuery, qry.Name, True
Next qry
Can anyone tell me why this won't work for the tables and queries, and hopefully also tell me how to get it to work?
Thanks!
Paul