hi,
i have buttons that allow users to scroll indefinitely through a form's recordset. it's set up so that when BOF is reached, the last record is opened; conversly, when EOF is reached, the first record should be opened.
the BOF check on movePrevious works fine. unfortunately i can't seem to get the moveNext EOF to work. basically i'm detecting if a new record is being created (EOF has been passed at this point). if so, move first. the exception thrown is 2105: Can't move to the specified record.
here's the code.
any help is greatly appreciated. thanks!!
..:: mirirom ::..
i have buttons that allow users to scroll indefinitely through a form's recordset. it's set up so that when BOF is reached, the last record is opened; conversly, when EOF is reached, the first record should be opened.
the BOF check on movePrevious works fine. unfortunately i can't seem to get the moveNext EOF to work. basically i'm detecting if a new record is being created (EOF has been passed at this point). if so, move first. the exception thrown is 2105: Can't move to the specified record.
here's the code.
Code:
Private Sub cmdMoveNext_Click()
On Error GoTo Err_cmdMoveNext_Click
DoCmd.GoToRecord , , acNext
If Me.NewRecord Then
DoCmd.GoToRecord , , acFirst
End If
Exit_cmdMoveNext_Click:
Exit Sub
Err_cmdMoveNext_Click:
msgbox Err.Number & vbCrLf & Err.Description
Resume Exit_cmdMoveNext_Click
End Sub
any help is greatly appreciated. thanks!!
..:: mirirom ::..