DoCmd.CopyObject 2002 vs 2003 Differences

G

Guest

I have a 2002 client database that links to 2000 server db's. The
functionality of the client side uses common table names across multiple
identical database structures but different data (see below ex). I use the
CopyObject command to copy the different links to the common table names that
the forms/queries use. This works fine in 2000 & 2002.

However, when I tested this on a 2003 system, the CopyOject function does an
Import of the table, not copying the link. Of course this is useless to me
since any changes would only be to a local table.

Is there a setting I'm missing or a better way to do this?

Example table names
01_tbl_Master
02_tbl_Master...
tbl_Master => used by the programming
DoCmd.CopyObject, "tbl_Master", acTable, "01_tbl_Master"
 
D

david epsom dot com dot au

Yes, CopyObject suddenly works differently (although I
think this is the old Access 97 behaviour back again?)

I think you can use TransferDatabase to copy links.
 
G

Guest

Yes the TransferDatabase worked with some modifications to my database tables
(a real pain on a live database). At least you can dictate acImport or acLink
on this code which would be difficult for Microsoft to change without telling
anyone in the next "upgrade" with any logic.

I was a little disappointed that there seems to be no information on the
change. The help screen for 2002 & 2003 CopyObject are exactly the same and
mention nothing about it now being an import. Furthermore, the help describes
this as just like using the menu Edit-Copy, Edit-Paste. However, in 2003, you
now have the selection of "Linked Table" if it was a linked table. You would
figure since this is the default here, it would be the default on the
command. Maybe there are flags in the new command that are not published yet
in the help menu.

My working code is
str_File="c:\My Documents\Database\Filename.mdb"
str_Table="tbl_Master"
DoCmd.TransferDatabase acLink, "Microsoft Access", str_File, acTable,
str_Table, str_Table
 
D

david epsom dot com dot au

2000 was a new version. 2002 was the last update to that version.
2003 was a new version, with only minor changes.

My users and marketing people insisted on jumping to 2000, skipping
2002 (the stable and patched version), then moving to 2003, with
new problems. How can I blame MS when my users and colleagues are
so dumb?

(david)
 

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

Top