This code should make 4 entries in a table, it only enters the first 2.
The Debug.? gives the correct results, they just don't get entered into the table.
I even tried transactions, but that made no diff.
Code: Select all
''Set Ws = DBEngine.Workspaces(0)
''Ws.BeginTrans
With rsOptIn
.MoveFirst
.Edit
![Dt] = StDate
.Update
.MoveNext
For X = 0 To 2
.Edit
![Dt] = DateAdd("yyyy", X, YrDate)
Debug.Print X; DateAdd("yyyy", X, YrDate)
.Update
.MoveNext
Next X
End With 'rsOptIn
''Ws.CommitTrans