Is my table hidden? Help!

D

Dan G.

Can anyone tell me how to determine if my table is a hidden table in
vba code? I tried the (.attributes And dbHiddenObjects) but that
shows my non hidden tables as well, what do I need to do?

Access 2K

Dan
 
T

Tim Ferguson

(e-mail address removed) (Dan G.) wrote in
Can anyone tell me how to determine if my table is a hidden table in
vba code? I tried the (.attributes And dbHiddenObjects) but that
shows my non hidden tables as well, what do I need to do?

Curious: hiding a table in the database window does not change the
tdf.Attributes value at all: this routine

For Each tdf In db.TableDefs
Debug.Print tdf.Name; Tab(32);
Debug.Print Hex$(tdf.Attributes)
Next tdf

shows zero for all user tables regardless of the setting in the database
window. Now, setting it in code like this:

db.TableDefs("Temp").Attributes = _
db.TableDefs("Temp").Attributes Or dbHiddenObject

not only hides the table in the database window but it doesn't appear even
when Show Hidden Objects is On. This seems to be analogous to Excel's
xlSheetVeryHidden attribute, but there's no inbetween value. Perhaps not
what the designers intended, or did they just forget to tell us?

Workound: set your Hidden attributes from code not from the db window.

All the best


Tim F
 

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