Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Nov 2001
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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.

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    I

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

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

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

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

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

  5. #5
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Mishawaka, Indiana, USA
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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.

Posting Permissions

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