Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attaching tables error in Access 2002

Status
Not open for further replies.

saroyal

Programmer
Jul 3, 2002
30
0
0
GB
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
 
Hi,

This may not be exactly what you're looking for, but in 2000 I've always used DoCmd.TransferDatabase with the acLink constant to link tables.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top