Avatar of Nihara Az
Nihara Az

asked on 

Acces: For Loop to number 123 in column

Hi. I know this is a simple question.
But when I try it out, my database keeps not responding and I have been reopening it a couple of times.
Would like to just check if my code is okay

I'm just using a For loop to number 1,2,3 in the WeekNo Column.
The 123 will keep on repeating.

Function seq()

 Dim i As Integer
 Dim db As DAO.Database
 Set db = CurrentDb()
 Set rs = db.OpenRecordset("NewTypes", dbOpenDynaset)
While rs.EOF = False

    For i = 1 To 3
        rs("WeekNo") = i
     Next i
End Function

Thank you!
DatabasesMicrosoft AccessVBA

Avatar of undefined
Last Comment
Nihara Az

8/22/2022 - Mon