G
Guest
-- I am using a form to display a recordset of results which are derived
from a query.
I want the form to scroll through the recordset from top to bottom and then
return to the first value and repeat the process.
I can get this to work using the following code
Function macGoToNextRec()
On Error GoTo macGoToNextRec_Err
DoCmd.GoToRecord , "", acNext
macGoToNextRec_Exit:
Exit Function
macGoToNextRec_Err:
MsgBox Error$
Resume macGoToNextRec_Exit
End Function
My problem is that at the end of the recordset I get an error message saying
cannot move to the next record.
Question how can I bypass the message and get the code to loop back to the
first record and start again.
Help would be much appreciated.
Thanks
Dave
Dave Hawks
from a query.
I want the form to scroll through the recordset from top to bottom and then
return to the first value and repeat the process.
I can get this to work using the following code
Function macGoToNextRec()
On Error GoTo macGoToNextRec_Err
DoCmd.GoToRecord , "", acNext
macGoToNextRec_Exit:
Exit Function
macGoToNextRec_Err:
MsgBox Error$
Resume macGoToNextRec_Exit
End Function
My problem is that at the end of the recordset I get an error message saying
cannot move to the next record.
Question how can I bypass the message and get the code to loop back to the
first record and start again.
Help would be much appreciated.
Thanks
Dave
Dave Hawks