Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005

    Question Unanswered: TransferDatabase Question

    Can the TransferDatabase method be used to import more than one object at a time? I have about 30 tables in a BE database and would like to link all of them from the FE at runtime. Can this be done in one pass or would I have to repeat the TransferDatabase method for each individual table?

    I'm currently using the following code to link 1 individual table:
    DoCmd.TransferDatabase acLink, "Microsoft Access", "C:\BE.mdb", acTable, "tblNews", "tblNews"

    Additionally, when I use this method the tables are duplicated/copied in the FE database, so I end up with tblNews, tblNews1, tblNews2, etc. Is there a way to prevent this or would the tables need to be deleted programatically each time the database is closed?

  2. #2
    Join Date
    Sep 2003
    MN US
    I posted the code I use to do this here (I use a function called PromptFileName, but you could substitute a literal for it "c:\yourpath" or whatever):

    This might help you

    It deletes, then re-links the tables.


Posting Permissions

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