hiding table

S

SN

Hi

I came across a tip in KB209841 about hiding table using VBA.

I tried it, and it seemed to work to a great extent. The thing is, to
unhide the table, I can't manually go to the table properties and uncheck
the Attributes box; I would need to do it through VBA.

Below is the working test code. Can anyone show me the code to set/reset
the Attributes box instead ?

Thanks
Steve

Sub test()
Dim db As Database
Dim tb As TableDef
Set db = CurrentDb
Set tb = db.TableDefs("Table1")
tb.Attributes = dbHiddenObject
Set tb = Nothing
Set db = Nothing
End Sub
 

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