hey everyone im using adodb connection in login system with do until loop., but im sorry i cant understand what can this looping do in loginning account, can anyone explain it to me?
im not the one who create this looping,., but im the one who made the connection.,.

here the code:

Public Sub login()
Call dbase
Set rspassword = New ADODB.Recordset
rspassword.Open "Select * From Accountinfo", cnConnect, 3, 3
If rspassword.RecordCount > 0 Then
Do Until rspassword.EOF
If Text1.Text = rspassword!UserName And Text2.Text = rspassword!Password Then

Set rspassword = Nothing

Timer1.Enabled = True
ctr = 0
Exit Do
Else
rspassword.MoveNext
ctr = ctr + 1


End If
Loop
If ctr > 0 Then
Set rspassword = Nothing
MsgBox "Invalid!", vbExclamation
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
ctr = 0
End If
End If

End Sub