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.
Dim objRec As DAO.Recordset
Private Sub Form_Load()
Set objRec = Me.Recordset
End Sub
Private Sub cmdNext_Click()
On Error GoTo Err_cmdNext_Click
objRec.MoveNext
If objRec.EOF Then
MsgBox "You have reached the end of the recordset", vbInformation
Exit Sub
End If
Exit_cmdNext_Click:
Exit Sub
Err_cmdNext_Click:
MsgBox Err.Description
Resume Exit_cmdNext_Click
End Sub
Private Sub Form_Unload()
Set objRec = Nothing
End Sub
[blue] Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone
[green]'Goto the same record on the form.[/green]
rst.FindFirst "[[purple][b]PrimaryKeyName[/b][/purple]] = [red][b]'[/b][/red]" & Me![purple][b]PrimaryKeyName[/b][/purple] & "[red][b]'[/b][/red]"
rst.MoveNext
If rst.EOF Then
MsgBox "Your Error Message Here!"
Else
DoCmd.RunCommand acCmdRecordsGoToNext
End If
Set rst = Nothing[/blue]