P.S.:
@klaus -- I've tested your code ... it works when you add a paranthese at the end of that line:
WHERE " & rowI & " = rowID"
)
Sorry, I missed that one.
I amended the code in post#12.
The rowID is an internal numbering of the rows in a database which begins with 1.
If you add five rows, the rowIDs will be 1,2,3,4,5.
Now, if you remove row 3, the rowIDs will be 1,2,4,5.
The row with rowID = 3 is removed but all the other rowIDs remain the same and are univoque.
In the second example if you use your code you will get an error because rowID = 3 doesn't exist anymore.