Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record Navigation Help 1

Status
Not open for further replies.

dbero

Technical User
Mar 31, 2005
109
US
I have a form bound to a query. On the form, I want to put a move forward/back cmd button on the form so the user may scroll through the records. for the move forward, I used the code below and it fails. Any suggestions on the code to move forward, but stop when at last record?

If Me.Recordset.EOF = True Then
Exit Sub
Else
DoCmd.GoToRecord , , acNext
End If
 
Perhaps something like this ?
With Me.Recordset
.MoveNext
If .EOF Then .MoveLast
End With

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top