I searched a lot and did not find a good solution to this problem.
So, I wrote the problematic function in another file, and if I need it, I activate it as follows:
On sp.mdb in the module:
Public Function soap30object() As Object Set soap30object = New SoapClient30 End Function
To the main file:
Public Sub soap30object() Dim ob As Object Dim appAccess As New Access.Application appAccess.OpenCurrentDatabase ("c:\sp\sp.mdb") Set ob = appAccess.Run("soap30object") End Sub
Have some fun!
Another solution
Replace the code in the module with runtime ...
Public Sub replacemodel(mdlname As String, fnd As String, cngto As String) Dim toi As Long, oldlin As String, i As Long, firstchr As String, linnewnum As Long, last_ As Boolean Dim frm As Form,mdl As Module DoCmd.OpenForm mdlname, acDesign Set mdl = Forms(mdlname).Module toi = mdl.CountOfLines With mdl For i = 1 To toi linnewnum = i oldlin = .lines(i, 1) If InStr(oldlin, fnd) <> 0 Then oldlin = Replace(oldlin, fnd, cngto) .ReplaceLine i, oldlin goto nexx End If Next i End With nexx: DoCmd.Close acForm, mdlname, acSaveYes Set mdl = Nothing 'All variables reset when you edit modul on msgbox "Program will restart now..." DoCmd.Quit acQuitSaveAll end Sub
source share