'What is wrong with this code that it picks up 'Name' from record 1 and puts it into every subsequent record 'rather than moving to record 2 and picking up record 2 'Name' and put that in 'LinkID' of record 2 'etc.
Command226 is a button attached to an Access 97 Form

Private Sub
Command226_Click()
' The goal is to go through a record set, taking information from the 'Name' field
' and puting it into another field called LinkID
Dim db As Database
Dim rst As Recordset
Dim mystring As String

Set db = CurrentDb()
Set rst = db.OpenRecordset("NCNames", dbOpenDynaset)

With rst
Do Until .EOF
If [RES_Y_OR_N] = -1 Then
mystring = Left([LAST_NAME], 10) + Left([FirstName], 5)
Else
mystring = Left([BUS_NAME], 15)
End If
.Edit
![LinkID] = mystring
.Update
.MoveNext
Loop
End With
End Sub

[Edited by Alan Thiessen on 05-28-2000 at 07:30 PM]