Can someone tell me what is wrong with this code :<br>
<br>
frmCashier.lstRegNo.Clear<br>
If Not rstJobs.BOF Then rstJobs.MoveFirst <br>
Do While Not rstJobs.EOF<br>
If rstJobs!paid = False And rstJobs!completed = True Then<br>
If frmCashier.lstRegNo.ListCount = 0 Then<br>
frmCashier.lstRegNo.AddItem rstVeh!regno<br>
Else<br>
For i = 0 To frmCashier.lstRegNo.ListCount - 1<br>
frmCashier.lstRegNo.ListIndex = i<br>
If rstJobs!regno = frmCashier.lstRegNo.Text Then Exit For <br>
frmCashier.lstRegNo.AddItem rstJobs!regno<br>
Next i<br>
End If<br>
End If<br>
rstJobs.MoveNext<br>
Loop<br>
<br>
I get an error 'no current record' at this line<br>
<br>
If rstJobs!regno = frmCashier.lstRegNo.Text Then Exit For <br>
<br>
frmCashier.lstRegNo.Clear<br>
If Not rstJobs.BOF Then rstJobs.MoveFirst <br>
Do While Not rstJobs.EOF<br>
If rstJobs!paid = False And rstJobs!completed = True Then<br>
If frmCashier.lstRegNo.ListCount = 0 Then<br>
frmCashier.lstRegNo.AddItem rstVeh!regno<br>
Else<br>
For i = 0 To frmCashier.lstRegNo.ListCount - 1<br>
frmCashier.lstRegNo.ListIndex = i<br>
If rstJobs!regno = frmCashier.lstRegNo.Text Then Exit For <br>
frmCashier.lstRegNo.AddItem rstJobs!regno<br>
Next i<br>
End If<br>
End If<br>
rstJobs.MoveNext<br>
Loop<br>
<br>
I get an error 'no current record' at this line<br>
<br>
If rstJobs!regno = frmCashier.lstRegNo.Text Then Exit For <br>