Article ID: 188801
Article Last Modified on 1/23/2007
Option Explicit
Function MakeHiddenAttachedTable(strDatabaseName As String, _
strTableName As String, strAttachedTableName As String)
Dim db As Database
Dim td As TableDef
Set db = CurrentDb
Set td = db.CreateTableDef(strAttachedTableName)
td.Connect = ";Database=" & strDatabaseName
td.SourceTableName = strTableName
db.TableDefs.Append td
td.Attributes = dbHiddenObject
Set td = Nothing
Set db = Nothing
End Function
?MakeHiddenAttachedTable ("Solutions", "Examples", "New Table")
A new hidden table named New Table that links the Examples table in the
Solutions database is created.
Option Explicit
Function DeleteHiddenAttachedTable(strAttachedTableName As String)
Dim db As Database
Set db = CurrentDb
db.TableDefs.Delete strAttachedTableName
End Function
?DeleteHiddenAttachedTable("New Table")
The new hidden table, New Table, is deleted.Additional query words: inf link attach attached
Keywords: kbhowto kbprogramming KB188801