has this happened for anyone else, usually start access up and get it to renumber the ID on my list of items, but to do this it has to start at the first entry... and for some reason it starts in middle of the list for number 1! this is becoming an issue because I use VBA mostly. Using .MOVENEXT in my loops. I do not get it. I've given up trying to identify where Access's internal pointer actually is. It seems to fly around.
not that his code will help, but this is how I generally do things:
Code:
Dim dbc As Object
Dim dbd As Object
Dim fldEnumerator2 As Object
Dim fldColumns2 As Object
Set dbc = CurrentDb
Set dbd = dbc.OpenRecordset("ItemAcceptance")
dbd.MoveFirst
curRec = 1: IDcount = 1
RowCount = 1:
tries = 0
curRec = 1: IDcount = 1
RowCount = 1:
For abcd = 1 To totalitems
For Each fldEnumerator2 In dbd.Fields
If fldEnumerator2.Name = "ID" Then
dbd.Edit: fldEnumerator2.Value = fldEnumerator2.Value - (smallestRec - 1): dbd.Update
End If
Next
dbd.MoveNext
Next