• Table export links (2003 sp2)

    Author
    Topic
    #449337

    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

    Viewing 0 reply threads
    Author
    Replies
    • #1101488

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

      • #1101490

        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

        • #1101492

          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.

          • #1101494

            bummer 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.

    Viewing 0 reply threads
    Reply To: Table export links (2003 sp2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: