ArcPad Scripting Object Model
Value Property
See Also  Example  Send comments on this topic.
Field Object : Value Property

Glossary Item Box

Description

Returns or sets the value of the field.

Property type

Read-write property

Syntax

object.Value= [ value ]

Return Type

Variant

Remarks

The Value property is the default property for the Field object. Therefore, the following two lines of code will yield the same result:

       MsgBox CStr(Map.Layers(1).Records.Fields("Field1").Value)
       MsgBox CStr(Map.Layers(1).Records.Fields("Field1"))

Example

Captures the date and time from the GPS and stores it in the DTSTAMP attribute field of the selected feature. This example assumes the attribute DTSTAMP exists.
Timestamp Attribute Example (VBScript)Copy Code
Sub DTCapture
  If Map.SelectionLayer Is Nothing Then Exit Sub
Dim pSelRS
  Set pSelRS = Map.SelectionLayer.Records
pSelRS.Bookmark = Map.SelectionBookmark
  pSelRS.Fields("DTSTAMP").Value = FormatDateTime(GPS.Properties("UTC"))
pSelRS.Update
  Set pSelRS = Nothing
End Sub

See Also

© 2012 All Rights Reserved.