RichO
Registered Yoozer
- Local time
- Today, 16:17
- Joined
- Jan 14, 2004
- Messages
- 1,036
There are a number of threads in the forum for a similar question about numbering records in forms and reports but I can't find my answer.
I have a table with a field that is currently blank. I want to fill this field with its corresponding record number. After opening the recordset I have tried the following:
But I get an overflow error because it just keeps repeating the first record in the set to infinity.
If I use "If Not rs.EOF Then.... End If" it updates only the first record and then exits. Why does it not get beyond the first record in the set?
I'm sure there is a very simple way to do this that I am not aware of.
Thanks for the help guys.
I have a table with a field that is currently blank. I want to fill this field with its corresponding record number. After opening the recordset I have tried the following:
Code:
Do While Not rs.EOF
RecCnt = RecCnt + 1
rs.edit
rs!RecNumber = RecCnt
rs.update
Loop
But I get an overflow error because it just keeps repeating the first record in the set to infinity.
If I use "If Not rs.EOF Then.... End If" it updates only the first record and then exits. Why does it not get beyond the first record in the set?
I'm sure there is a very simple way to do this that I am not aware of.
Thanks for the help guys.