How can I change Table Attribute programmatically

G

Guest

I like to know the table attribute of each table as it is hidden or not for
each table of my database.

How?
 
P

pietlinden

I like to know the table attribute of each table as it is hidden or not for
each table of my database.

How?

Application.SetHiddenAttribute acTable,"Customers", True

Help file is your friend... he lives under the F1 key.


Public Sub ShowHiddenTables()
Dim intCounter As Integer
For intCounter = 0 To DBEngine(0)(0).TableDefs.Count - 1
Debug.Print DBEngine(0)(0).TableDefs(intCounter).Name,
Application.GetHiddenAttribute(acTable, DBEngine(0)
(0).TableDefs(intCounter).Name)
Next intCounter

End Sub

'sample run...
showhiddentables
_Copy of tblHolidays False
_tbl8529s False
_tblAFSAnniversaries False
_tblLevelChanges False
Events False
EventsFS False
MSysAccessObjects True
MSysAccessXML True
MSysACEs True
MSysIMEXColumns True
MSysIMEXSpecs True
MSysObjects True
MSysQueries True
MSysRelationships True
Name AutoCorrect Log True
olkCalendar False
Sheet1 False
tblHolidays False
tblIntake False
tblIntakeFSandSCOH False
tblMaxCaseload False
tblServiceQuarters False
tblServiceWeeks False
tblSocialWorkers False
tblTeams False
tblYears False

True=Hidden.
 

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