newbie needs help

Jackske

Registered User.
Local time
Today, 08:52
Joined
Feb 28, 2000
Messages
48
I have a table call Members
In the table, one of the records is called 'rank'
I want to write some code to replace the rank with a value.
For example, in the first record, rank has to be replaced with number 67
In the second record, rank has to be replaced with number 68
etc…
I made a new module and I did write this code, but it does not work.
Why?
------------------------------
Sub Number()
Dim db As Database
Dim rs As Recordset
Dim Nr As Long


Set db = Application.CurrentDb
Set rs = db.OpenRecordset("Members")
Nr = 66


rs.MoveFirst

Do
Nr = Nr + 1
rs.Fields("rank").Value = Nr
rs.MoveNext
Loop Until rs.EOF
End Sub
--------------------------

Thanks in advance,

Jack/Belgium
 

Users who are viewing this thread

Back
Top Bottom