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!

Copy a Link

Status
Not open for further replies.

PurpleUnicorn

Programmer
Mar 16, 2001
79
0
0
US

I have an odd problem. I have the following code:
DoCmd.CopyObject pDatabase, , acTable, ptblName
in an application. It copies a Link from the current database to the destination (pDatabase). This code works just fine on my home computer and my laptop.

However, when I run it at my office - rather than copy the link, the entire table gets copied. Needless to say - this is a huge problem. Am I missing something here? Is there another way to do this in code? (I have already tried transferdatabase acexport method with the same result)

Any help will be greatly appreciated!

Thanks
 
Have a look at the DoCmd.TransferDatabase method with the acLink argument.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks for the fast reply. I will not be able to test this until I return to the office. However, I do have a couple of questions.

1. I am actually working with 3 mdbs. For the sake of simplicity, I will call them db1, db2 db3. I use db1 to control the processing of very large tables. From db1, I create db2 and build tables in db2. I then link from db1 to db2 - the actual tables never reside in db1. Will the DoCmd.TransferDatabase (using acLink argument) copy the link from db1 to db3?

2. Why would the DoCmd.CopyObject work differently on my computer than the one in my office? Access 2003 is being used in both instances.

Thanks again!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top