Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub Go2Prev_Click()
If Me.CurrentRecord = 1 Then
MsgBox "You are on the First Record!"
Else
DoCmd.GoToRecord , , acPrevious
End If
End Sub
Private Sub Go2Next_Click()
If Me.CurrentRecord = Me.RecordsetClone.RecordCount Or Me.NewRecord = True Then
MsgBox "You are on the Last Record!"
Else
DoCmd.GoToRecord , , acNext
End If
End Sub
Private Sub Form_Current()
If Me.CurrentRecord = 1 Then
Me.Go2Prev.Enabled = False
Else
Me.Go2Prev.Enabled = True
End If
If Me.CurrentRecord = Me.RecordsetClone.RecordCount Or Me.NewRecord = True Then
Me.Go2Next.Enabled = False
Else
Me.Go2Next.Enabled = True
End If
End Sub
Many developers prefer using custom navigation buttons because the native ones are so small and hence more difficult, for a lot of users, to click on. Also, with a custom Command Button, you can provide a keyboard shortcut for the action that is visible to the user. It's all about personal preferences and the tech savvy, or lack thereof, of your end users.1DMF said:I'm curious, is there a reason you are not using the built in form navigation controls?