Select to view content in your preferred language

Autocalculate numeric field on form created in ArcPad Studio 7

766
1
04-22-2010 10:08 AM
AmyLavender
Deactivated User
Hi, I'm sure this is relatively easy but could use some help. I am customizing forms in ArcPad Studio 7 to collect noxious weed data. The user enters a radius in meters and I would like to automatically calculate the radius_ft field based on the value (in meters) assigned by the field staff. Thanks for any assistance. Amy
Tags (3)
0 Kudos
1 Reply
RobChouinard
Frequent Contributor
Use the "onchange" event of that editbox to call a method in your script. Have another editbox for radius_ft on your form.

Sub DisplayFeet()
    Dim objControl, objPage, Meters, Feet

    'Get the control, page objects
    Set objControl = ThisEvent.Object
    Set objPage = ThisEvent.Object.Parent
    
    Meters = objControl.Value
    Feet = Meters * 3.2808399

    'Display the value on a editbox control named "edtFeet" on the same page
    objPage.Controls("edtFeet").Value = Feet & "ft"
End Sub


Not tested but should get you where you want to go.
0 Kudos