Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide Database Objects From Users

Status
Not open for further replies.

Bill6868

Technical User
Mar 20, 2007
96
US
I've been developing a database that I am about to pass over to another office. I'd like to hide all the objests that make the database work - queries, forms, tables, macros. But I'd like the users to be able to write queries, save them and have them appear in the objects tab, but I don't want their queries to show up in the many queries I already have that run the database for fear that someone may accidently delete one.

I knew how to hide/unhide objects in the old Access 97 version, but in Access 2007 I am clueless, despite searching the help screens. I've found out how to hide an object (one at a time) under the database tools property sheet icon, but I have not figured out how to unhide it. Luckly while experimenting I am using a copy of the database.

Any advice would be most appreciated.
 
Good grief....I think I just answered my own question. On the "All Access Objects" tab, right click the title bar and choose "navigation options".
 
Some VBA.

Code:
Sub HideForms()
Dim frm
For Each frm In CurrentProject.AllForms
   SetHiddenAttribute acForm, frm.Name, False
Next
End Sub

Sub HideTables()
Dim tbl
For Each tbl In CurrentDb.TableDefs
    If Left(tbl.Name, 4) <> "MSys" Then
        SetHiddenAttribute acTable, tbl.Name, True
    End If
Next
End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top