Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Location
    france
    Posts
    6

    Unanswered: connection to a other database

    Hello erverybodies !

    I would like to open a other database (this database is secured) for exporting a query into excel file.

    Here is the code :

    ' create Object type access
    Set accObject = CreateObject("Access.application")

    ' charge the db
    accObject.OpenAccessProject ("N:\TMP\ASPA TMP.mdb") ***

    'Export the query into excel file
    DoCmd.TransferSpreadsheet acExport, 8, "TEST", "\\Pcwsv01 \ASPA_All\MMP\TEST.xls", True, ""

    ' closing the db
    accObject.CloseCurrentDatabase
    ' closing the access object
    accObject.Quit

    My process bug in this step -> ***
    However, I am sure of my file path of the database.
    Could you help me, please.
    Thank a lot !
    Galldup

  2. #2
    Join Date
    Feb 2003
    Posts
    24

    Re: connection to a other database

    Pourquoi tu n'utlises pas la commande suivante pour ouvrir ta base de donnees:
    OpenDatabase(Name:=<path>)
    ou <path> dans ton cas serait ("N:\TMP\ASPA TMP.mdb"...

    J'espere que ca t'aidera!

    Originally posted by galldup
    Hello erverybodies !

    I would like to open a other database (this database is secured) for exporting a query into excel file.

    Here is the code :

    ' create Object type access
    Set accObject = CreateObject("Access.application")

    ' charge the db
    accObject.OpenAccessProject ("N:\TMP\ASPA TMP.mdb") ***

    'Export the query into excel file
    DoCmd.TransferSpreadsheet acExport, 8, "TEST", "\\Pcwsv01 \ASPA_All\MMP\TEST.xls", True, ""

    ' closing the db
    accObject.CloseCurrentDatabase
    ' closing the access object
    accObject.Quit

    My process bug in this step -> ***
    However, I am sure of my file path of the database.
    Could you help me, please.
    Thank a lot !
    Galldup

Posting Permissions

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