Results 1 to 4 of 4

Thread: prob - Calling program as Dll from access form

  1. #1

    Thread Starter
    Superbly Moderated NeedSomeAnswers's Avatar
    Join Date
    Jun 2002
    Location
    Manchester uk
    Posts
    2,657

    Question prob - Calling program as Dll from access form

    I am having a problem when trying to call a program that i have developed that i have compiled as a dll from an access form.

    I have successfully called this program in this manner from another VB project, but when i try using the same method from an access form i get the following error message -

    Automation error
    The callee (server[not server application]) is not available and disappeared; all connections are invalid. The call may have executed.
    The access db has a reference to the program, and uses the following methods from the dll to load the project up -

    (ExpediaCM is the name of the reference)

    Dim x As ExpediaCM.clsStartUp

    Set x = New ExpediaCM.clsStartUp

    With x
    .AppMode = "IPMaintenance"
    .ImportRefNo = Me.lstmatches
    .CalledFromOtherApp = True
    .StartApplication
    .ReturnIntersectID
    End With


    .appmode - the program has 3 modes it can open in - this sets the mode.

    .ImportRefNo - this passes across a file number from the opening program to the dll.

    .CalledFromOtherApp - is a boolean which is set to determine whether the main form in the dll is displayed modally or not - if True it is displayed modal.

    .StartApplication - this goes through some validation & then loads & shows the main form in the dll program.

    It is here [.StartApplication] that the error occurs

    If anyone has any insight as to why this is occuring i would be very grateful.

  2. #2

    Thread Starter
    Superbly Moderated NeedSomeAnswers's Avatar
    Join Date
    Jun 2002
    Location
    Manchester uk
    Posts
    2,657
    Does nobody have any ideas ????

    are thier any known problems with opening vb dll programs from access?

    i could post clsStartup if anybody thought it would help, but you wouldn't be able to run through the code at run time (without messing about) as it is part of a much larger program, and references ini files and the like.

    I am just about out of ideas myself !!!!
    Any comments at all would be appreciated !

  3. #3
    Frenzied Member swatty's Avatar
    Join Date
    Aug 2002
    Location
    somewhere on earth
    Posts
    1,478
    I would say the callee is your Access app.

    In your dll , i think you get some values for the App.path but the dll isn't stored in the same path as the access app.

    Don't know if it is possible but you should try to debug through it when calling the startapplication routine.
    Code:
    If Question = Incomplete Then
       AnswerNextOne
    Else
       ReplyIfKnown
    End If
    cu Swatty

  4. #4
    Hyperactive Member FATBOYPEE's Avatar
    Join Date
    May 2001
    Location
    Charleville (Ireland) Still. ANYONE GOT A JOB I CAN HAVE ? GIZA JOB. I CAN DO THAT....
    Posts
    463
    It looks like you need to look deeper into the code of the StartApplication method of your DLL. Whats it trying to start ??

    Your DLL is instantiating in memory as you're able to set other properties etc.

    Peeman.

    Best Bar.....

Posting Permissions

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



Click Here to Expand Forum to Full Width