<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ArcPad 10 Script Error but No Script Error in ArcPad 8.0 in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/arcpad-10-script-error-but-no-script-error-in/m-p/604183#M4377</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jay,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Were you able to resolve this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Gerry Finan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 May 2013 17:19:05 GMT</pubDate>
    <dc:creator>GerardFinan</dc:creator>
    <dc:date>2013-05-20T17:19:05Z</dc:date>
    <item>
      <title>ArcPad 10 Script Error but No Script Error in ArcPad 8.0</title>
      <link>https://community.esri.com/t5/arcpad-questions/arcpad-10-script-error-but-no-script-error-in/m-p/604182#M4376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi people, I have an annoying bug to figure out. I have a simple VB script to auto increment a numeric field to the next highest ID. I have two forms that onopen Call the script. Each form has the same script. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In ArPad 8.0 I have no script errors, and the forms load and numeric field auto increments as intended.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using the same Check Out files (axf, apm etc) and I open it in ArcPad 10 I get a script error on only one of the forms:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]16832[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Why would I get script errors in 10 and not 8?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the script that I use for both forms:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub InitializeForm&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Do any form initialization in this sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim objEFPageOneControls,objEditForm&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set objEditForm=ThisEvent.Object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set objEFPageOneControls=objEditForm.Pages("page1").Controls&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Initilaization for form in any mode&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Disable the ID edit box&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;objEFPageOneControls("ID").Enabled=False&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Get the layer's recordset (to pass into the ReturnNextID function)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim objstlidRS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set objstlidRS=Layer.Records&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Update the id and set the form to load on creation&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If objEditForm.Mode=3 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;objEFPageOneControls("ID").Value=ReturnNextID (objstlidRS, "ID")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Free Objects&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set objEFPageOneControls=Nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set objEditForm=Nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set objstlidRS=Nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Application.Map.Layers("Completed_2012").Forms("EDITFORM").Pages("page1").Controls("ENTEREDBY").Value = Application.UserProperties("LoggedInEmployee")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Function ReturnNextID (objRS, strFieldName)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim intMax&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Get the first record&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;objRS.MoveFirst&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Initialize the max value to the first record&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;intMax=CInt(objRS.Fields(strFieldName).Value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Loop through the records, updating the max value if neccessary&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim intCurrVal&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;While Not objRS.EOF&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; intCurrVal=CInt(objRS.Fields(strFieldName).Value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; If (intCurrVal &amp;gt; intMax) Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; intMax=intCurrVal&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; objRS.MoveNext&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Wend&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ReturnNextID=intMax+1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Function&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help if anyone can assist!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jay Kirby&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 15:24:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/arcpad-10-script-error-but-no-script-error-in/m-p/604182#M4376</guid>
      <dc:creator>JayKirby</dc:creator>
      <dc:date>2012-08-10T15:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPad 10 Script Error but No Script Error in ArcPad 8.0</title>
      <link>https://community.esri.com/t5/arcpad-questions/arcpad-10-script-error-but-no-script-error-in/m-p/604183#M4377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jay,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Were you able to resolve this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Gerry Finan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 17:19:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/arcpad-10-script-error-but-no-script-error-in/m-p/604183#M4377</guid>
      <dc:creator>GerardFinan</dc:creator>
      <dc:date>2013-05-20T17:19:05Z</dc:date>
    </item>
  </channel>
</rss>

