Hide a table via VBA ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

'Is it possible to programatically hide a table like the tables prefixed with
Usys.
If you click View--Properties on a table there is an attributes 'Hidden'
checkbox, indicating this may be possible.
I looked in the object browser at the DAO classes and found
tabledef.attributes and a value of dbHiddenObject but I don't know the syntax
to set this value. There is also a class in ADOX called Properties which I
think may also be usable. Does anyone have knowledge of this?
 
I figured this one out myself, if anyone is interested its:
Application.SetHiddenAttribute acTable, tblName, True

-Dorian
 
If your table is prefixed w/ USys, Access will treat it as a "system" table.

If your options are set to NOT display system tables, your USys... tables
won't show.

It isn't necessary (and is possible redundant and/or confusing in the
future) to also "hide" the table.

Regards

Jeff Boyce
<Office/Access MVP>
 
my tables are not system tables.

Jeff Boyce said:
If your table is prefixed w/ USys, Access will treat it as a "system" table.

If your options are set to NOT display system tables, your USys... tables
won't show.

It isn't necessary (and is possible redundant and/or confusing in the
future) to also "hide" the table.

Regards

Jeff Boyce
<Office/Access MVP>
 
Access treats a table whose name is prefixed with USys as a system table.
Sorry if I wasn't clear before...

Jeff Boyce
<Office/Access MVP>
 
Back
Top