I am wanting to attach tables after a user selects a datbase to source them from.
Last time I wrote anything like this was in Access 97 so I must be doing something wrong and its probably staring me in the face but I still cannot fathom it.
If I use the property dbAttachedTable then I get invalid property error, and if I don't use it I get no field defined error.
Dim tdfTest As DAO.TableDef
Set tdfTest = CurrentDb.CreateTableDef("tblTest", dbAttachedTable, "tblSource", ";DATABASE=c:\folder\data.mdb"
CurrentDb.TableDefs.Append tdfTest
Simon
Last time I wrote anything like this was in Access 97 so I must be doing something wrong and its probably staring me in the face but I still cannot fathom it.
If I use the property dbAttachedTable then I get invalid property error, and if I don't use it I get no field defined error.
Dim tdfTest As DAO.TableDef
Set tdfTest = CurrentDb.CreateTableDef("tblTest", dbAttachedTable, "tblSource", ";DATABASE=c:\folder\data.mdb"
CurrentDb.TableDefs.Append tdfTest
Simon