K
Kan D.
How do I programmatically assign a "True" value to a particular table's
"Hidden" attribute?
Kan
"Hidden" attribute?
Kan
Klatuu said:CurrentDb.TableDefs("MyTableName").Attributes = dbHiddenObject
Dirk Goldgar said:NO! Don't do it that way. Unless they've fixed this bug in recent
versions, adding dbHiddenObject to any table's Attributes will cause the
table to be deleted during the next compact operation.
Use
Application.SetHiddenAttribute acTable, "TableName", True
instead.
(Incidentally, even if using dbHiddenObject were safe, you wouldn't want
to just set the Attributes to that one attribute -- you'd be smashing
any other attribute bits the table might have set. You would need to OR
the attribute value instead.)
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
Klatuu said:Thanks, Dirk. I wasn't aware of that bug.
Klatuu said:Thanks, Dirk. I wasn't aware of that bug.
Kan said:How do I programmatically assign a "True" value to a particular table's
"Hidden" attribute?
CurrentDb.TableDefs("MyTableName").Attributes = dbHiddenObject
"Kan D." wrote:
> How do I programmatically assign a "True" value to a particular table's
> "Hidden" attribute?
>
> Kan
>
>
>
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.