Hi All!
I am connecting to an Access Database using DSNLess connection string. Then I tried to update the recordset (or should I say table?) through these codes:
then an error message appears:
highlighting the bold line in the debug window.
What did I do wrong here?
TIA
mansii
I am connecting to an Access Database using DSNLess connection string. Then I tried to update the recordset (or should I say table?) through these codes:
Code:
Dim oConn As ADODB.Connection
dim localKB as ADODB.Recordset
Set oConn = New ADODB.Connection
oConn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=" & App.Path & "\myData.mdb;" & _
"Uid=admin;" & _
"Pwd="
Set localKB = New ADODB.Recordset
With localKB
.ActiveConnection = oConn
.Source = "Select * from S_KB"
.LockType = adLockOptimistic
.CursorLocation = adUseClient
.Open
End With
Dim rsTemp as ADODB.Recordset
Set rsTemp = localKB.Clone
For j = 0 To localKB.RecordCount - 1
FlagKB = " "
xDocID = localKB!docID
theFilter = "KB_dokid ='" & xDocID & "'"
rsTemp.Filter = theFilter
If rsTemp.RecordCount > 1 Then
FlagKB = "4"
rsTemp.Filter = adFilterNone
Else
FlagKB = " "
End If
localKB!Flag = FlagKB
If Not localKB.EOF Then
[b]localKB.MoveNext[/b]
Else
Exit For
End If
Next j
then an error message appears:
Code:
[Microsoft][ODBC Microsoft Access Driver] Query is too complex.
What did I do wrong here?
TIA
mansii