R
Rico
Hello,
I have a project that I've been handed and I'm in the midst of setting up a
development environment. The program is written in Access 2002, on a Win2k
Server using SQL Server 2000 as the back end.
I have replicated the environment (Win2k server, Access 2002 and SQL Server
2000). When I run the FE in the development environment, I get "Error in
loading DLL" at a point where the form has the line
"rstLoanList.ActiveConnection = CurrentProject.Connection". This works in
the production version. There are no broken references or anything. I've
pasted the code at the end of this message, but I don't think there is
anything in the code that is breaking this.
Any help would be greatly appreciated.
Thanks!
Private Sub cmdUpdate_Click()
Dim stDocName As String
Dim rstLoanList As ADODB.Recordset
Set rstLoanList = New ADODB.Recordset
'rstLoanList.ActiveConnection = CurrentProject.Connection
rstLoanList.ActiveConnection = CurrentProject.Connection
rstLoanList.CursorType = adOpenKeyset
rstLoanList.LockType = adLockOptimistic
rstLoanList.Open "Select * from LoanList where OverPayment > 0"
Do Until rstLoanList.EOF
Me![txtClientID] = ""
Me![txtLastName] = ""
Me![txtFirstName] = ""
Me![txtInvNumber] = 0
Me![txtOverPayment] = 0
Me![txtOverPaymentDate] = ""
Me![txtClientID] = rstLoanList![ClientID]
Me![txtLastName] = rstLoanList![LastName]
Me![txtFirstName] = rstLoanList![FirstName]
Me![txtInvNumber] = rstLoanList![InvNumber]
Me![txtOverPayment] = rstLoanList![OverPayment]
Me![txtOverPaymentDate] = rstLoanList![OverPaymentDate]
stDocName = "qryCreateOPFromLoanListTable"
DoCmd.SetWarnings (False)
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.SetWarnings (True)
rstLoanList.MoveNext
Loop
rstLoanList.Close
Set rstLoanList = Nothing
I have a project that I've been handed and I'm in the midst of setting up a
development environment. The program is written in Access 2002, on a Win2k
Server using SQL Server 2000 as the back end.
I have replicated the environment (Win2k server, Access 2002 and SQL Server
2000). When I run the FE in the development environment, I get "Error in
loading DLL" at a point where the form has the line
"rstLoanList.ActiveConnection = CurrentProject.Connection". This works in
the production version. There are no broken references or anything. I've
pasted the code at the end of this message, but I don't think there is
anything in the code that is breaking this.
Any help would be greatly appreciated.
Thanks!
Private Sub cmdUpdate_Click()
Dim stDocName As String
Dim rstLoanList As ADODB.Recordset
Set rstLoanList = New ADODB.Recordset
'rstLoanList.ActiveConnection = CurrentProject.Connection
rstLoanList.ActiveConnection = CurrentProject.Connection
rstLoanList.CursorType = adOpenKeyset
rstLoanList.LockType = adLockOptimistic
rstLoanList.Open "Select * from LoanList where OverPayment > 0"
Do Until rstLoanList.EOF
Me![txtClientID] = ""
Me![txtLastName] = ""
Me![txtFirstName] = ""
Me![txtInvNumber] = 0
Me![txtOverPayment] = 0
Me![txtOverPaymentDate] = ""
Me![txtClientID] = rstLoanList![ClientID]
Me![txtLastName] = rstLoanList![LastName]
Me![txtFirstName] = rstLoanList![FirstName]
Me![txtInvNumber] = rstLoanList![InvNumber]
Me![txtOverPayment] = rstLoanList![OverPayment]
Me![txtOverPaymentDate] = rstLoanList![OverPaymentDate]
stDocName = "qryCreateOPFromLoanListTable"
DoCmd.SetWarnings (False)
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.SetWarnings (True)
rstLoanList.MoveNext
Loop
rstLoanList.Close
Set rstLoanList = Nothing