Im trying to loop through the records on a form but Im unsure how to do it! Below is the code I have written so far but it dosent work! Ive read through lots of articales but cant seem to understand how do it.
Code:
If Me.txtsite = 0 Then
Do
While OpenRecordCheck > 0
If Me.Soloution = "Moved Crew" Then
Me.Total_Time_Down = ((Format(Me.Crew_Moved_Time, "hh") * 60) + Format(Me.Crew_Moved_Time, "nn")) - ((Format(Me.Time_Reported, "hh") * 60) + Format(Me.Time_Reported, "nn"))
Me.Time_Equipment_Back_Up = Now()
Me.Time_Equipment_Back_Up_TMIS = Now()
Me.Requery
TurnBlack
Else
Me.Time_Equipment_Back_Up = Now()
Me.Time_Equipment_Back_Up_TMIS = Now()
Me.Requery
Me.Total_Time_Down = ((Format(Me.Time_Equipment_Back_Up, "hh") * 60) + Format(Me.Time_Equipment_Back_Up, "nn")) - ((Format(Me.Time_Reported, "hh") * 60) + Format(Me.Time_Reported, "nn"))
TurnBlack
End If
If OpenRecordCheck = 0 Then
Exit Do
End If