Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Mar 2007
    Location
    Wikltshire UK
    Posts
    152
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Transfer Table accross Network (2000/2003)

    Hi.

    Been playing around with: docmd.transferspreadsheet in VBA: Can't seem to get it to work accross the network, is there a solution??? Just in case it should cause a problem its transfering from Access 2003 into 2000, but the 2003 is running 2000 format.

    Table Name: "First File"
    Path: "//cserver/db/db.mdb"
    Run from the: "//WS1/desktop/db1/mdb"

    It would also be good if you could show me the syntax for applying the network Login information at the end of the code, as this will eliminate another stage of the internal process.

    I'm trying to do this in code as I have to apply daily changes to the Table name via a variable once I've got the basics working.

    Thanks in advance

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Transfer Table accross Network (2000/2003)

    I'm not sure what you're trying to do. DoCmd.TransferSpreadsheet either exports data from the current database to an Excel workbook, or it imports (or links) data from an Excel workbook into the current database. It cannot be used to transfer data between Excel and another database than the current one.
    If you want to transfer data from one database to the other, you should use DoCmd.TransferDatabase, not DoCmd.TransferSpreadsheet.

  3. #3
    2 Star Lounger
    Join Date
    Mar 2007
    Location
    Wikltshire UK
    Posts
    152
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Transfer Table accross Network (2000/2003)

    Yep oops your right I was Using TransferDatabase just typed Spreadsheet.

    Have you got any clues as to format. As I said tried but failed. Are there other ways of doing it.

    Thanks.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Transfer Table accross Network (2000/2003)

    Paths use backslashes instead of forward slashes /.

    To export from the current database:

    DoCmd.TransferDatabase acExport, "Microsoft Access", "cserverdbdb.mdb", acTable, "First File", "First File"

    To import into the current database:

    DoCmd.TransferDatabase acImport, "Microsoft Access", "cserverdbdb.mdb", acTable, "First File", "First File"

    The StoreLogin argument doesn't apply to transfers between Access databases, it is intended for SQL Server (for example). As far as I know, you cannot specify network login information.

Posting Permissions

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