Insert Linked table through code?

  • Thread starter Thread starter Sunny
  • Start date Start date
S

Sunny

Hi

Can I insert a linked table through code? I saw the mvps website, but
it only refreshes link on an existing table. How can i insert a new
one?

any help would be appreciated

thanks
Sunny
 
Sunny said:
Hi

Can I insert a linked table through code? I saw the mvps website, but
it only refreshes link on an existing table. How can i insert a new
one?

any help would be appreciated

The simplest way is to use DoCmd.TransferDatabase with acLink for the
first argument. See the online help for details. Here's an example:

DoCmd.TransferDatabase _
acLink, _
"Microsoft Access", _
"C:\Temp\SomeOtherDB.mdb", _
acTable, _
"TableToLink", _
"NameForTableHere"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top