709-218-7927

The Landfall Garden House

60 Canon Bayley Road

CANADA A0C 1B0

CPRGreaves@gmail.com

Home

Christopher Greaves

Finding the next record

Build a Command Button cmdFind with a caption "Find". We will use the Wizard to gain familiarity with the business of VBA code to find records.

In the category Record Navigation" select the action "Find Next". Nominate the text "Next" as a caption for the Command Button. We will call our Command Button cmd_Next.

If you examine the event code generated by the Wizard you will see this:

Private Sub cmd_Next_Click()
On Error GoTo Err_cmd_Next_Click
Screen.PreviousControl.SetFocus
DoCmd.FindNext
Exit_cmd_Next_Click:
Exit Sub
Err_cmd_Next_Click:
MsgBox Err.Description
Resume Exit_cmd_Next_Click
End Sub

7092187927 CPRGreaves@gmail.com

Bonavista, Friday, December 04, 2020 5:52 PM

Copyright © 1996-2020 Chris Greaves. All Rights Reserved.