Hi there,
There's a good full example of this at:
http://tinyurl.com/9l55d (look for Brenda's post near the end) but as the example is very lengthy, the basic steps are as follows:
- Delete the old linekd table with deleteobject if necessary
- Create a new tabledef with createtabledef
- Set the .connect and .sourcetable properties of this tabledef
- append it to the TableDefs collection
- refresh the tabledefs collection (tabledefs.refresh)
- if you need more than read access to the tables, then you need to specify in code the unique record identifier. You can do this with a docmd.runsql sending a "CREATE UNIQUE INDEX" command to the DB. See Brenda's example on the link above.
Hope that helps - let me know,
Al
http://www.integritec.co.uk