I am using the findnext method and for each record found, I take an action.
It's seem, that I have an infinitive loop.
Do I have to use the Movenext instruction with a findnext ?
Private Sub Formateur_Click()
Dim dbs As DAO.Database
Dim rsQuery As DAO.Recordset
Dim strDay As String
Dim f As Form
Set dbs = CurrentDb
Set rsQuery = dbs.OpenRecordset("rq_Form
ateur2", dbOpenDynaset)
Set f = Me
rsQuery.FindFirst "[Formateur] Like 'Chabot, Carole-Marie'"
Do While Not rsQuery.EOF
If Not rsQuery.NoMatch Then
strDay = "F1J" & Day(rsQuery.Fields!dateDeb
utHeure)
f(strDay).Value = rsQuery.Fields!Acti
End If
rsQuery.FindNext "[Formateur] Like 'Chabot, Carole-Marie'"
Loop
End Sub
Thanks,
Carol
Start Free Trial