Viv,
Thanks for the tip! I did have to make a minor modification to make it work for me. Here’s what I did (changes in bold text):
[tt]
Public Sub SetHiddenTableAttribute(tblName As String)
Dim tbl As TableDef, dbs As Database
Const cSYSTEM_OBJ = &H80000000
Const cSYSTEM_OBJ_ALT = 2
Set dbs = OpenDatabase(CurrentDb.Name)
Set tbl = dbs.TableDefs(tblName)
If ((tbl.Attributes And cSYSTEM_OBJ) <> cSYSTEM_OBJ) And _
((tbl.Attributes And cSYSTEM_OBJ_ALT) <> cSYSTEM_OBJ_ALT) Then
If ((tbl.Attributes And dbAttachedTable) = dbAttachedTable) Then
tbl.Attributes = (tbl.Attributes And &HFFFFFFF) Or dbHiddenObject
Else
tbl.Attributes = tbl.Attributes Or dbHiddenObject
End If
End If
Set tbl = Nothing
dbs.Close
Set dbs = Nothing
End Sub
[/tt]
Thanks again,
GGleason