Results 1 to 5 of 5

Thread: Copy Object

  1. #1
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Unanswered: Copy Object

    I am trying to copy table form one .MDB to another .MDB using the comand
    DoCmd.CopyObject DestinationDB,,,)

    Wher should I determine the Source Table
    I used something like
    DoCmd.CopyObject "C:\D1.mdb", "Orders", acTable, "C:\Db2.mdb" & "Orders_COPY"

    But was wrong?
    Any Ideas

  2. #2
    Join Date
    Mar 2004
    Location
    belgium
    Posts
    290
    DoCmd.CopyObject "C:\D1.mdb", "Orders", acTable, "C:\Db2.mdb" & "Orders_COPY"

    "C:\Db2.mdb" & "Orders_COPY"= C:\Db2.mdbOrder_copy

    strange extension, is that may be the prob.

    emiel

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    I wrote it this way ["C:\Db2.mdb " & "Orders_COPY"] because I use variables

    i.e
    C:\Db2.mdb " & txtBox_TableName
    Last edited by hammbakka; 11-16-04 at 08:13.

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Ok, I managed it. You have to open the Distination DB at first then the Source DB. Then use :
    DoCmd.CopyObject glbT_DestinationDB, NewName, acTable, _
    currentName

  5. #5
    Join Date
    Mar 2004
    Location
    belgium
    Posts
    290
    like wise i did :-))))

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •