I have a continous with a number of bound fields on it, the last of which is a checkbox.
When the form is run, the user can select one or more of the records by selecting the apprpriate checkbox. When the user click the OK button some code is executed to run throughall of the rows on the form and create a comma delimted list of the ID numbers.
The code is as follows:
Do While Me.NewRecord = False
MsgBox Me.SampleID
If Me.chkResultsReceived Then
If strReturnedList = "" Then
strReturnedList = Me.SampleID
Else
strReturnedList = strReturnedList & ", " & strReturnedList
End If
End If
DoCmd.GoToRecord acDataForm, Me.Name, acNext
Loop
My problem is that the loop begins at the current row (i.e. the last record selected).
Can anyone tell me how to start from the first row?
Thanks in advance.
When the form is run, the user can select one or more of the records by selecting the apprpriate checkbox. When the user click the OK button some code is executed to run throughall of the rows on the form and create a comma delimted list of the ID numbers.
The code is as follows:
Do While Me.NewRecord = False
MsgBox Me.SampleID
If Me.chkResultsReceived Then
If strReturnedList = "" Then
strReturnedList = Me.SampleID
Else
strReturnedList = strReturnedList & ", " & strReturnedList
End If
End If
DoCmd.GoToRecord acDataForm, Me.Name, acNext
Loop
My problem is that the loop begins at the current row (i.e. the last record selected).
Can anyone tell me how to start from the first row?
Thanks in advance.