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

set hidden attribute of table 3

Status
Not open for further replies.

chrissie1

Programmer
Aug 12, 2002
4,517
BE
does anybody have an idea how to set the hidden attribute of a table via code.

Somebody asked me this because they have 110 tables wich they want to set to hidden.

Sorry I had to ask.

Christiaan Baes
Belgium

"My new site" - Me
 
are there more than 110 tables? To my knowledge there is no way to do it programmatically, however; one could set those tables up in a backend database and then hide all tables there through the security menu.
 
A starting point:
CurrentDb.TableDefs("Table name").Attributes = dbHiddenObject

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I agree hneal98

and I pass on your suggestion PHV.

BTW. PHV if you get to a thousand stars, will you be throwing a party?

Christiaan Baes
Belgium

"My new site" - Me
 
Actually, you could easily use PHV's suggestion by implementing a loop and looping through all the tables. That way, you would have more flexability as to how you hide them.
 
chrissie1 - I think I'd be extremely carefull with this. This may have the effect of deleting your tables on your next compact. This has never been intended for hiding objects, see for instance Bugs: To Hide or Not To Hide

Here is a quote from a guy called MichKa (I would guess someone has heard of him)
"Stay away from using DAO to hide objects in the Access UI.

You must either use the manual method (right clikck/properties) in Access 95/97/2000, or the programmatic method in Access 2000. This is not a case where a shortcut is going to cause your app anything but grief in the end. "

The quote comes from this CDMA thread, Hiding Objects in DB Window

As you will probably find, MichKa recommends that this property is only touched by members of Microsofts Jet team.

Again - be extremely carefull with this, chrissie1

So - in 97 version - only right click - hide ...

The programmatic version for 2000+, is probably this

[tt]application.sethiddenattribute actable, "tblName", true[/tt]

Darn - this even made me post links with the new kindergarten look, I hate it ...

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top