I am in the process of converting my existing accounting software system written in VB 6.0 to use Microsoft ActiveX Data Objects instead of its current Pervasive Btrieve 6.15. For the most part, I am making great progress, but I am stuck now on one small section of code that I just cannot figure out. Below is the pasted code snippet:
90 With dtaGLChart
100 .CommandType = adCmdText
110 .ConnectionString = "Provider=" & strProvider & ";Data Source=" & strGLDataPath & "\GLData.MDB"
120 .CursorLocation = adUseClient
130 .CursorType = adOpenKeyset
140 .LockType = adLockOptimistic
150 .Mode = adModeShareDenyNone
160 If lngDept = 0 Then
170 .RecordSource = "SELECT AcccountNo, AccountTitle FROM ChartOfAccounts ORDER BY AccountNo;"
190 .RecordSource = "SELECT AcccountNo, AccountTitle FROM ChartOfAccounts WHERE Department = " & _
CStr(lngDept) & " ORDER BY AccountNo;"
200 End If
220 End With
and below is the two error messages I am getting when the .Refresh command is executed on line 210 (virtually identical code works elsewhere).