Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    Table export links (2003 sp2)

    The code below has been used in an Access 2000 form command button to export a table to an archive database successfully for years. I am rewriting the code into a new form in Access 2003 and it links the table instead. Is it a version thing?

    DoCmd.TransferDatabase acExport, "Microsoft Access", expPath, acTable, _
    "CHB_LP_Master_Table_Previous", expTable, False
    Thanks
    chuck

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

    Re: Table export links (2003 sp2)

    Are you absolutely sure that this specific line creates a link? The syntax of DoCmd.TransferDatabase hasn't changed significantly.

  3. #3
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Table export links (2003 sp2)

    Yes. When I open the archive database the arrow is there and "type" is Table:Linked Access. Here is what I have written so far. It is the only command line in the code. (Variables are publicly declared in the module.)

    Private Sub Command0_Click()
    expDate = Date
    expMonth = DateSerial(Year(expDate), Month(expDate) - 2, Day(expDate))
    expPath = InputBox("The path to the database you are exporting to...", _
    " " & conAppTitle, _
    "W:PNCADVSpecial AssetsCHBCHB_ARCHIVES.mdb")
    expTable = InputBox("The table you are exporting will be named...", _
    " " & conAppTitle, _
    "CHB_LP_Master_Table" & "_" & Format(expMonth, ("mmmm dd, yyyy")) & "_" & "Data")
    DoCmd.TransferDatabase acExport, "Microsoft Access", expPath, acTable, _
    "CHB_LP_Master_Table_Previous", expTable, False
    End Sub
    Thanks
    chuck

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

    Re: Table export links (2003 sp2)

    As far as I know, DoCmd.TransferDatabase acExport ... will only create a link in the destination database if the source table (CHB_LP_Master_Table_Previous) in the current database is a linked table. But that holds for all versions of Access.

  5. #5
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Table export links (2003 sp2)

    <img src=/S/bummer.gif border=0 alt=bummer width=15 height=15> Gee wiz Hans, the table is linked in this new database. It is a good thing I only have 95 more working days before I retire, my brain is drying up.
    Thanks
    chuck

Posting Permissions

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