J
JonWayne
How do I programatically create a table in an external database, that links
a table in the local database?
a table in the local database?
Douglas J. Steele said:If you're trying to create a table that's linked to a table in another
database, you don't define fields: they're defined by the original table.
However, you need a semi-colon in front of the word Database in the connect
string (and you don't need one at the end)
See whether this works:
Sub tester2()
Dim db As Database, tbl As TableDef
Const S$ = "C:\Working\Access\Santarosa\Santarosa.mdb"
Const t$ = "Santarosa Zips 5Digit"
Set db = OpenDatabase("C:\Working\Access\All County\Library.mda")
Set tbl = db.CreateTableDef(t)
tbl.Connect = ";DATABASE=" & S
tbl.SourceTableName = t
db.TableDefs.Append tbl
End Sub