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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What property of a table shows whether it's hidden? 1

Status
Not open for further replies.

mikevh

Programmer
Apr 23, 2001
1,033
US
Hi --

Can anyone tell me what property of an Access table
shows whether it's hidden? I hid a few tables by
right-clicking them and checking the "hidden" properties
box, but if I look at the table properties in design
view (I can still get to the tables 'cause I checked
"show hidden" in Tools>Options) I don't see anything
that indicates that the tables are hidden. Can anyone
tell me where I would see this? Thanks.
 
You can use the Application.GetHiddenAttribute method e.g.

Public Sub ShowTableHiddenAttributes()

Dim daoDB As DAO.Database
Dim daoTDF As DAO.TableDef

Set daoDB = CurrentDb()

For Each daoTDF In daoDB.TableDefs
Debug.Print daoTDF.Name & "Hidden: " & _
Application.GetHiddenAttribute(acTable, daoTDF.Name)
Next daoTDF


End Sub

You can also use the SetHiddenAttribute method to programmatically hide/unhide tables and other objects in your mdb.

Cheers.

 
Thanks alot, this is real helpful.
Would you know the name of the property whose value these
methods return/set?
 
I'm pretty sure there isn't an actual object level property that tells us whether or not an object is visible in the Database window (e.g. forms!MyForm.Hidden).

The closed I've found to such a thing is the dbHiddenObject attribute of a TableDef, which can be used to make a table truly hidden (even from yourself).

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top