Is my table hidden? Help!

  • Thread starter Thread starter Dan G.
  • Start date Start date
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
 
(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
 
Back
Top