View Full Version : looping Problem


amit82
02-08-2009, 09:28 PM
Very new to Access and VBA
I am getting a looping problem
need your dear help please?


Public Function updatetable1()
Dim db As dao.Database
Dim rs1 As Recordset
Set db = CurrentDb()
Set rs1 = db.OpenRecordset("Singapore_Access_Tracker")
rs1.MoveFirst
Do Until rs1.EOF
srno1 = rs1![sr no]
MsgBox (srno1)
Loop
rs1.Close
Set rs = Nothing
Set db = Nothing

End Function

boblarson
02-08-2009, 09:32 PM
If I am reading this correctly, you are missing a

rs.MoveNext

just before your

Loop

amit82
02-08-2009, 09:34 PM
Thanks..
I knew ....something silly has been missing from my end