Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / May 2005

Tip: Looking for answers? Try searching our database.

UnHide All the Database Objects

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LisaB - 27 Apr 2005 22:27 GMT
Does anyone know code to unhide all the hidden objects in the database?

1. I am going to run the Analyser/Documenter for all the objects in my
database.
2. However, Only the objects that are not hidden are available for selection
3. My Database has over 50 hidden forms and even more hidden queries
4. Its a big pain to go to each objects properties (individually) and
uncheck the hidden attribute

I use the following code to go through all the table objects and rename
them.  Is there a similar code that I can use to go through each object in
the database and make the hidden attribute false?
---------------------
Public Function RenameTablesdbo()

Dim db As DAO.Database
Dim tbl As DAO.TableDef

Set db = CurrentDb()
For Each tbl In db.TableDefs
    If Left$(tbl.Name, 4) = "dbo_" Then
       tbl.Name = Mid$(tbl.Name, 5)
    End If
Next tbl

End Function
----------------------
Nikos Yannacopoulos - 28 Apr 2005 10:30 GMT
Lisa,

Here's how you can do it for tables:

Sub Unhide_Tables()
For Each vObj In CurrentDb.TableDefs
    vHidden = Application.GetHiddenAttribute(acTable, vObj.Name)
    If Left(vObj.Name, 4) <> "MSys" And vHidden = True Then
        Application.SetHiddenAttribute acTable, vObj.Name, False
    End If
Next
End Sub

Likewise for QueryDefs (not like "~sq_"), Forms etc.

HTH,
Nikos

> Does anyone know code to unhide all the hidden objects in the database?
>
[quoted text clipped - 23 lines]
> End Function
> ----------------------
LisaB - 02 May 2005 16:49 GMT
Thank you

> Lisa,
>
[quoted text clipped - 41 lines]
> > End Function
> > ----------------------
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.