I am trying to add a button to an ArcPad form that sets the values to Cereal and Corn. This is as far as I have gotten and I am stuck.
I Made apl that has a form. I get the values into the form using the arcpad data manager from ArcMap. it populates the form giving me combo boxes. What I need is a button that will make it easier to choose specific values from the combo boxes. So instead of scrolling down the combo boxes to make my choice and hitting OK. I want to just hit the corn button and then that updates the combo boxes and adds the form and closes it. In the image you can understand what it is I need to do. This is for field work and the easier it is to insert some crop types the faster it gets done.
'once called updates the fields to add in corn to the form then closes the form Sub InsertCorn(ByVal layerName, ByVal pageName) Dim objEditForm Dim objTheLayer Dim objEFPageControls Set objTheLayer = Application.Map.Layers.item(layerName) Set objEditForm = objTheLayer.Forms(1) Set objEFPageControls= objEditForm.Pages(pageName).Controls objEFPageControls("cboAGRLU_ClassGRP").value = "Cereal" objEFPageControls("cboCropType_Varietal").value = "Corn" Set objEFPageControls= Nothing Set objEditForm = Nothing Set objTheLayer = Nothing End sub
then in the onclick event on the button:
Call InsertCorn("Corn", "PAGE1")