Hey guys,
I am currently using ArcPad to collect field data. I have had several requests of things to figure out with ArcPad and most of them I have figured out and have working great. One request is to populate a field using a script that calculates a formula A-B/ Length * 100.
Sub SumFunction
Dim objControl, objForm, Cul_Length, D_DSCt_DSI, riff_ele, WC_Slope, US_In_ele
Set objControl = ThisEvent.Object
Set objForm = ThisEvent.Object.Parent
riff_ele = objControl.Value
WC_Slope = objForm.Controls("txtUS_In_ele").Value - riff_ele / (Cul_Length + D_DSCt_DSI) * 100
objForm.Controls("txtWC_Slope").Value = WC_Slope
End Sub
1. I am not sure if this script is correct even though it validates ( I am not a programmer but I have studied it a little).
2. Where in ArcPad Studio would I place the script? There are several events to choose from but I am not sure what one I should use.
3. Will this fill in while the form is open or would it need to close and open back up.
If anyone has suggestions on how to get this to work it would be much appreciated.
Thanks
Brian