• can i trigger a function in another database? (Access 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » can i trigger a function in another database? (Access 2000)

    Author
    Topic
    #367924

    Can i trigger a function in another database?
    I want to open another database, trigger function in this database called FncCollect, then Close the remote database and then continue working im my database.Can i do this?
    I think i can open the outsie database with the following code:
    Dim objConn As New ADODB.Connection
    objConn.Open “Provider= Microsoft.Jet.OLEDB.4.0;Data Source = c:BEFrontEnd.mdb”
    now i want to trigger the function FncCollect in this database ???
    But how can i give the command to run the code or the function called FncColect? And is it possible at all?
    Because the function FncCollect is saved in the outside database called FrontEnd.mdb and not in the
    database in which i am working.I am very curious about the answer i may receive.

    Viewing 2 reply threads
    Author
    Replies
    • #580059

      I

    • #580065

      If you set a reference to the external mdb, then you can use any function in that mdb like another function.
      I wonder if this interact with the normal working of these mdb.

      • #580128

        Make that any *public* function in the referenced database, Francois. However, if you call the function in the referenced database, it will normally execute in the current workspace, which can get very confusing. You would need to use the CodeDb reference instead of the CurrentDb.

    • #580171

      How about linking to the tables in your current DB and putting the function in your current DB. Then you can run the function easily.

    Viewing 2 reply threads
    Reply To: can i trigger a function in another database? (Access 2000)

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

    Your information: