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 NextRecCMD_Click()
On Error GoTo Err_NextRecCMD_Click
DoCmd.GoToRecord , , acNext
Exit_NextRecCMD_Click:
Exit Sub
Err_NextRecCMD_Click:
MsgBox "You have reached the LAST record", vbOKOnly
'MsgBox Err.Description
Resume Exit_NextRecCMD_Click
End Sub
Private Sub PrevRecCMD_Click()
On Error GoTo Err_PrevRecCMD_Click
DoCmd.GoToRecord , , acPrevious
Exit_PrevRecCMD_Click:
Exit Sub
Err_PrevRecCMD_Click:
MsgBox "You have reached the FIRST record", vbOKOnly
'MsgBox Err.Description
Resume Exit_PrevRecCMD_Click
End Sub
Private Sub FirstRecCMD_Click()
On Error GoTo Err_FirstRecCMD_Click
DoCmd.GoToRecord , , acFirst
Exit_FirstRecCMD_Click:
Exit Sub
Err_FirstRecCMD_Click:
MsgBox Err.Description
Resume Exit_FirstRecCMD_Click
End Sub
Private Sub LastRecCMD_Click()
On Error GoTo Err_LastRecCMD_Click
DoCmd.GoToRecord , , acLast
Exit_LastRecCMD_Click:
Exit Sub
Err_LastRecCMD_Click:
MsgBox Err.Description
Resume Exit_LastRecCMD_Click
End Sub
Private Sub Form_Current()
' Provide a record counter for using with
' custom navigation buttons (when not using
' Access built in navigation)
'Dim rst As DAO.Recordset
'Dim lngCount As Long
'Set rst = Me.RecordsetClone
'With rst
'.MoveFirst
'.MoveLast
'lngCount = .RecordCount
'End With
'Show the result of the record count in the text box (txtRecordNo)
' Me.txtRecordNo = "Record " & Me.CurrentRecord & " of " & lngCount
End Sub