R
Rizza
I am trying to send a string to a field based on criteria in each record.
I run through once no problem. The failure is on the second time in the
loop.
If anyone can shed some light on what I am doing wrong or direction I should
head I would greatly appreciate it.
Error message:
-2147217836 (0x80040e54) The number of rows with pending changes has
exceeded the set limit.
Function subtest2()
Dim cnn As ADODB.Connection
Dim rstD As ADODB.Recordset
Set cnn = CurrentProject.Connection
Set rstD = New ADODB.Recordset
rstD.Open "[a table]", cnn, adOpenKeyset, adLockBatchOptimistic
'more code here
With rstD
Do While .EOF <> True
'more code here
!Need = "Y"
.MoveNext
'more code here
Loop
.UpdateBatch
End With
End Function
I run through once no problem. The failure is on the second time in the
loop.
If anyone can shed some light on what I am doing wrong or direction I should
head I would greatly appreciate it.
Error message:
-2147217836 (0x80040e54) The number of rows with pending changes has
exceeded the set limit.
Function subtest2()
Dim cnn As ADODB.Connection
Dim rstD As ADODB.Recordset
Set cnn = CurrentProject.Connection
Set rstD = New ADODB.Recordset
rstD.Open "[a table]", cnn, adOpenKeyset, adLockBatchOptimistic
'more code here
With rstD
Do While .EOF <> True
'more code here
!Need = "Y"
.MoveNext
'more code here
Loop
.UpdateBatch
End With
End Function