Select to view content in your preferred language

Populating form controls automatically

3119
1
10-23-2014 11:58 AM
DavidBierman
Deactivated User

Hi All,

 

I am new to programming in ArcPad.  I am stumped on one problem, and I was hoping someone could help me.

 

I would like to populated a form control automaically.

 

Following the tutorial from http://arcscripts.esri.com/data/as15207.pdf 

 

I wrote the following vps script

 

Sub myScript

  Dim objFrmCtls

  Set objFrmCtls=Applets("Hello World").Forms("Form1").Pages("Page1").Controls

  objFrmCtls("Edit1").Value = "Hello"

  Applets("Hello World").Forms("Form1").Show

End Sub

 

This is my corresponding apa file

 

<?xml version="1.0" encoding="UTF-8"?>

<ArcPad>

  <APPLET name="Hello World">

  <SCRIPT language="VBscript" src="helloWorld.vbs"/>

  <TOOLBARS>

  <TOOLBAR name="HelloWorld" visible="true" caption="DFB" create="true" image="$bex">

  <TOOLBUTTON image="$happy" name="btnOne" shortcut="" visible="true" onclick="Call MyScript" tooltip="Press Me"/>

  </TOOLBAR>

  </TOOLBARS>

  <FORMS>

  <FORM name="FORM1" caption="Form 1" width="130" height="130">

  <PAGE name="PAGE1" caption="Page 1 DFB">

  <EDIT name="Edit1" x="31" y="14" width="80" height="12" defaultvalue="" tooltip="" tabstop="false" border="false"/>

  </PAGE>

  </FORM>

  </FORMS>

  </APPLET>

</ArcPad>

 

I get an error that says:

 

Microsoft VBScript runtime error

Permission denied

[Line:4, Column :2]

Source Text Unavailable

 

Does anyone know what is wrong? 

 

I am using ArcPad Studio version 10.0

0 Kudos
1 Reply
DavidBierman
Deactivated User

I figured out the problem.  Thanks anyway.

0 Kudos