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
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