D
Dave
I have a form that runs a sub to connect to a remote server with the
following script:
Private Sub MLP_Proc_Click()
' declare and instantiate the object variables
Dim cnMarvin As Connection
Set cnMarvin = New Connection
Dim rsMLP As Recordset
Set rsMLP = New Recordset
Dim comExecute As Command
Set comExecute = New Command
It works fine in the original form. If I make a new form (in another
database) and copy the script to the new form and executing the script it
fails with the message: "Compile error - Invalid use of New Keyword" and
highlites "New Connection" part of the script.
Is there something else I should be duplicating to the new form?
following script:
Private Sub MLP_Proc_Click()
' declare and instantiate the object variables
Dim cnMarvin As Connection
Set cnMarvin = New Connection
Dim rsMLP As Recordset
Set rsMLP = New Recordset
Dim comExecute As Command
Set comExecute = New Command
It works fine in the original form. If I make a new form (in another
database) and copy the script to the new form and executing the script it
fails with the message: "Compile error - Invalid use of New Keyword" and
highlites "New Connection" part of the script.
Is there something else I should be duplicating to the new form?