Customizing form in ArcPad

2230
1
07-06-2013 10:00 AM
SaidAbou_Kharroub
New Contributor
Hey,

I am creating forms in ArcPad for monitoring trees reforested in big hectares areas. I have created plots shapefile, where the plot represent the number of trees inside whether it is planted or not. So for this reason, next to the plot there will be a combo box that has two values only (Planted; Non-Planted),
So for now, I need when I navigate to a certain plot, and I entered the value Planted , other values I will enter like Number of trees, area of the plot --etc.
And if I entered Non-Planted I want the other values and controls to be disabled, so for that I will not get lost, especially that the monitoring of trees will take around 6-7 hours. Please let me know how to add a function so I can disable control if a value is entered like Non-Planted???!!

Many thanks,
Said
Tags (3)
0 Kudos
1 Reply
BrysonWebber
New Contributor III
If you run a script all you need to do is add an if then statement that would enable or disable the combo boxes.  It would look something like this:

Sub onPlotType
Dim pControls

Set pControls=ThisEvent.Object.Parent.Controls

If StrComp(pControls("domPlotType").Value, "Planted") <> 0 Then
  pControls("txtNumTrees").Enabled=false
  pControls("txtArea").Enabled=false
else
  pControls("txtNumTrees").Enabled=true
  pControls("txtArea").Enabled=true
end if

End Sub

Hopefully this helps.

Bryson
0 Kudos