I edited my previous post perhaps after you originally read it.
The actual record ID numbers were not critical to my question. The point is T9 records in the table were not represented in the posted sample. Why - should they be deleted in the cleanup process?
This will be a periodic process?
The following code worked in the sample db.
Code:
Option Compare Database
Option Explicit
________________
Sub PopulateHeader()
Dim rs As DAO.Recordset, strHeader As String
Set rs = CurrentDb.OpenRecordset("SELECT * FROM Raw_Data WHERE Header Is Null ORDER BY ID;")
While Not rs.EOF
If rs!Field6 = "T0" And strHeader <> Left(rs!Field1, 14) Then
strHeader = Left(rs!Field1, 14)
Else
rs.Edit
rs!Header = strHeader
rs.Update
End If
rs.MoveNext
Wend
End Sub
EDIT: I see you did some posting while I was composing.