Hidden attributes (1 Viewer)

jca

I need to think it over !
Local time
Today, 12:23
Joined
Aug 1, 2001
Messages
42
I'm trying to know if a table is hidden in my code but the attributes value is not set to 1 for hidden even when the table is hidden.
I check it like this:
If dbRecherche.TableDefs(i).Attributes = dbHiddenObject Then

But it doesn't work, no table has the dbHiddenObject attribute. When I try to set a table with this attribute, it become hidden even if the show Hidden and Systems tables are checked. Is there a way to check if the table has been hidden with the property menu in the right-click mouse menu ?

Thanks for any help.
JCA

[This message has been edited by jca (edited 12-12-2001).]
 

AlanS

Registered User.
Local time
Today, 12:23
Joined
Mar 23, 2001
Messages
292
The Attribute property may combine multiple settings. For instance, if the following attributes are defined for the House object:

vbSplitLevel = 1
vbOver20YearOld = 2
vbAtLeast4Bedrooms = 4

if a particular house has both a split-level design and 4 bedrooms, its Attribute property would be set to vbSplitLevel + vbAtLeast4Bedrooms = 5. If you attempted to test for equality with either of those constants, the test would fail even though they have been set.

The way to test whether a particular constant has been applied in this case is:

If (MyHouse.Attributes And vbSplitLevel)

which will correctly indicate whether the house is a split-level, regardless of the presence or absence of other settings.
 

PearlGI

Registered User.
Local time
Today, 17:23
Joined
Aug 30, 2001
Messages
125
Try this:

If dbRecherche.TableDefs(i).Attributes <> 0 Then

If the attribute is zero the file is visible, therefore by default if it's not zero it must be hidden!!

But I'm sure someone will point out the flaw in this logic.
 

jca

I need to think it over !
Local time
Today, 12:23
Joined
Aug 1, 2001
Messages
42
PearGI:
The flaw is if it's a linked table the attributes is not zero and it's not hidden.
 

Users who are viewing this thread

Top Bottom