Hide a table via VBA ?

M

mscertified

'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?
 
M

mscertified

I figured this one out myself, if anyone is interested its:
Application.SetHiddenAttribute acTable, tblName, True

-Dorian
 
J

Jeff Boyce

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>
 
M

mscertified

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>
 
J

Jeff Boyce

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>
 

Ask a Question

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.

Ask a Question

Top