• Export Report Object (XP)

    Author
    Topic
    #439725

    My clients are allowed to modify reports in the front end database (there is no code behind). When they install a new front end we need to get their modified reports into the new front end. Unless you can suggest a better strategy, I need to copy the report object (not the data) into the back end after it i’s modified. Then when a new version is installed it copies them back. I am having trouble with transferdatabase method and the help isn’t much help. the example it has is –
    DoCmd.TransferDatabase acImport, “Microsoft Access”, “C:My DocumentsNWSales.mdb”, acReport, “NW Sales for April”, “Corporate Sales for April”

    this doesn’t have a path to the destination database and the help talks about import/exporting data not objects.

    here’s the code I am trying to make work but I get an err 13 Type mismatch

    strSource = “C:DataFrontend.mdb”
    strDestination = “C:DataBackend.mdb”
    strObjectName = “rptDailySummary”
    strDatabaseType = “Microsoft Access”

    DoCmd.TransferDatabase , acExport, strDatabaseType, strSource, acReport, strDestination, strObjectName, strObjectName

    Viewing 0 reply threads
    Author
    Replies
    • #1051355

      You have a superfluous comma immediately after DoCmd.TransferDatabase, causing all arguments to shift.

      Personally, I wouldn’t use the backend database to store reports, even temporarily. Why not rename the old frontend and import directly from that into the new frontend?

      BTW, DoCmd.TransferDatabase can be used to import/export database objects. You’re doing this when ObjectType is set to acReport.

      • #1051507

        I didn’t have the syntax quite right either.
        DoCmd.TransferDatabase acExport, “Microsoft Access”, strExternalDataBase, acReport, strObjectName, strObjectName works.of course it only needs the path to the other database.
        Lot easier to work out when I got rid of the superfluous comma.
        Thanks.

    Viewing 0 reply threads
    Reply To: Export Report Object (XP)

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

    Your information: