Go to first record if on last record

valgore

Registered User.
Local time
Today, 13:22
Joined
May 24, 2012
Messages
24
Hello, I've been looking around this forum and others for an answer, and I can't figure this one out.
I'm using Access 2010 and I have a form populating based on a table. when the form opens, it displays the first record and the user can cycle through all the records until the end by using a button I created. What I want to happen is when they hit the last record and want to cycle again, it takes them back to the first record.


Josh
 
Maybe you could do this:
Put this code in the On Click event of your button after your existing code.
Code:
If Me.NewRecord Then
  DoCmd.GoToRecord , , acFirst
End If
When a user reaches the last record, clicking the button will take them to a new record which the supplied code will catch and then go to the first record.
 
perfect. thank you!
 

Users who are viewing this thread

Back
Top Bottom