<?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: Subtracting two numbers in vbscript on a form in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/subtracting-two-numbers-in-vbscript-on-a-form/m-p/734494#M5321</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just tried it out myself using a custom applet and all works well. I attached the applet, so you can see if it works for you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Jul 2010 14:48:10 GMT</pubDate>
    <dc:creator>Almarde_Ronde</dc:creator>
    <dc:date>2010-07-15T14:48:10Z</dc:date>
    <item>
      <title>Subtracting two numbers in vbscript on a form</title>
      <link>https://community.esri.com/t5/arcpad-questions/subtracting-two-numbers-in-vbscript-on-a-form/m-p/734493#M5320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attached two pics of my login form.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The "working login form.jpg" shows: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Starting Mileage = 88, Ending Mileage = 92, Total Mileage = 4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So EndingMileage (92) - Starting Mileage (88) = Total Mileage (4)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This works fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The "nonworking login form.jpg" shows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Starting Mileage = 99, Ending Mileage = 105, Total Mileage = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So EndingMileage (105) - Starting Mileage (99) = Total Mileage (0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This does NOT work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please help.&amp;nbsp; Either vbscript or arcpad 7.1.1 thinks that the first number in&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Starting Mileage (9) in the 99 value is greater than the first number in &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ending Mileage (1) in the 105 value????&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can get this formula to work if I add a 0 in front of the 99 in Starting Mileage.... so this works&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ending Mileage (105) - Starting Mileage (099) = 6, but I don't want my users&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to have to put a 0 in front of a number if it was 99 miles, and then there speedometer goes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to 105 miles.....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I get around this issue??? Is there some script I can write in vbscript?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thank you&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;James Ireland&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GIS Technician&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 14:57:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/subtracting-two-numbers-in-vbscript-on-a-form/m-p/734493#M5320</guid>
      <dc:creator>JamesIreland</dc:creator>
      <dc:date>2010-07-14T14:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Subtracting two numbers in vbscript on a form</title>
      <link>https://community.esri.com/t5/arcpad-questions/subtracting-two-numbers-in-vbscript-on-a-form/m-p/734494#M5321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just tried it out myself using a custom applet and all works well. I attached the applet, so you can see if it works for you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jul 2010 14:48:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/subtracting-two-numbers-in-vbscript-on-a-form/m-p/734494#M5321</guid>
      <dc:creator>Almarde_Ronde</dc:creator>
      <dc:date>2010-07-15T14:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Subtracting two numbers in vbscript on a form</title>
      <link>https://community.esri.com/t5/arcpad-questions/subtracting-two-numbers-in-vbscript-on-a-form/m-p/734495#M5322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: coriba&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not sure of the cause, seems funny.&amp;nbsp; did you try casting the values?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;result = cint(objctl1.value)-cint(objctl2.value)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jul 2010 13:33:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/subtracting-two-numbers-in-vbscript-on-a-form/m-p/734495#M5322</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2010-07-16T13:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Subtracting two numbers in vbscript on a form</title>
      <link>https://community.esri.com/t5/arcpad-questions/subtracting-two-numbers-in-vbscript-on-a-form/m-p/734496#M5323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;yes I tried putting cInt and they didn't work either.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I forgot to mention I am using a form in a system folder &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;on the Arpad.apx&amp;nbsp; &amp;amp; Arcpad.vbs&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attached my code, not sure if it will work for you to test, but here it is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;James Ireland&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jul 2010 14:15:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/subtracting-two-numbers-in-vbscript-on-a-form/m-p/734496#M5323</guid>
      <dc:creator>JamesIreland</dc:creator>
      <dc:date>2010-07-16T14:15:42Z</dc:date>
    </item>
  </channel>
</rss>

