English

How To: Create a GoToPage* button on custom ArcPad EditForm

Summary

Instructions and script sample provided allow ArcPad users to code a button on a custom form to go to another page of the form.

For example: User wants a button located on Page 8 of custom form to take the user to Page 1 when clicked.

Procedure

Add a Button control and code the 'onclick' event.

  1. Open ArcPad Studio and the ArcPad layer file (.apl).
  2. Click the Forms button and double-click the EDITFORM listed in the Forms dialog box.
  3. Using the Control Pallette, click and drag a Button control onto the appropriate page.
  4. Give the control a name. Click the Events page > select the 'onclick' event > paste the following code sample into the Event Script box:

    Note:
    The shapefile and page name needs to match that of the data being used. 'CampusTrees' is the name of the shapefile and 'Page1' is the name of the page in the provided sample.

    Code:
    Dim pg
    Set pg = Application.Map.Layers.Item("CampusTrees").Forms.Item("EditForm").Pages.Item("Page1")

    'Activate desired page
    pg.Activate