Question : Copy From One Line to the Next

Hello,
I have a problem and I'm wondering if it can be solved with code or query. I have data that list like this:766K6694

             766K0000
            766K9999
I need to be able to fill in the next record with the one above it. And I have 3000 records that may have gaps. Is there another way to do this other than manually? See Attached File for Example.
Thanks in advance!

Answer : Copy From One Line to the Next

run this codes

Sub fillIt()
Dim rs As DAO.Recordset, prevPN, curPN
Set rs = CurrentDb.OpenRecordset("710Convert_Claim_Listing")
Do Until rs.EOF
   
    curPN = rs("POLICYNUMBER")
    If Len(curPN & "") = 0 Then
        rs.Edit
        rs!POLICYNUMBER = prevPN
        rs.Update
        Else
        prevPN = rs("POLICYNUMBER")
   
    End If
rs.MoveNext

Loop
rs.Close
End Sub
Random Solutions  
 
programming4us programming4us