
CreateTableDef Does Not Accept vbAttachedTable as Parameter
Hi "Office Development"
Quote:
>I'm trying to programmatically attach an Access table to the current Access
>database. I've created a tabledef with the following statement:
> Set tdf = db.CreateTableDef("tblTable", dbAttachedTable, "tblTable",
>";DATABASE=C:\ACCESS\TEST1.MDB")
You don't actually specify 'dbAttachedTable'. Jet determines that the
table is attached by virture of the fact that you have specified a
"connect" argument.
In Access 2.0 you could specify this and it wouldn't cause any
problems. In Access 97 you must NOT specify 'dbAttachedTable' or else
you get the error you reported.
Try leaving that argument off.
-- Jim Ferguson, FMS
http://www.fmsinc.com