|
-
Apr 28th, 2003, 11:06 AM
#1
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.
-
Apr 29th, 2003, 03:32 AM
#2
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 !
-
Apr 29th, 2003, 04:41 AM
#3
Frenzied Member
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
-
Apr 29th, 2003, 05:26 AM
#4
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|