| 416-621-9348 cgreaves@chrisgreaves.com | |
|---|---|
| Home Services Products |
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
Loading
Toronto and Mississauga, Sunday, December 05, 2010 3:19 PM
Copyright © 1996-2010 Chris Greaves. All Rights Reserved.