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.