<?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: Referencing controls in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/referencing-controls/m-p/326656#M2393</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What I think you're asking is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You reference a control in a form without issue, such as a button click firing-&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ThisEvent.Object (gives a reference to the button)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;or if it was the form's onload, the same thing would give a reference to the form itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So you want to reference a different control than the one that is getting its event fired, which could be done like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ThisEvent.Object.Parent.Controls("ControlName")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Adding the .Parent gives you a reference to the page (one heirarchy level up), or form (two heirarchies up) if you were to do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ThisEvent.Object.Parent.Parent &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then you could get a reference to the form, and once you can reference the form, access the other controls / pages the usual ways. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Aug 2010 15:08:02 GMT</pubDate>
    <dc:creator>EricHajek1</dc:creator>
    <dc:date>2010-08-03T15:08:02Z</dc:date>
    <item>
      <title>Referencing controls</title>
      <link>https://community.esri.com/t5/arcpad-questions/referencing-controls/m-p/326655#M2392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I can easily reference controls in a form from within an event of the form e.g. form load event. But I cannot reference a control from within an event of another control on the same page or form. Help is much needed on how to do this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 05:34:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/referencing-controls/m-p/326655#M2392</guid>
      <dc:creator>AtinLangoAL</dc:creator>
      <dc:date>2010-08-03T05:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing controls</title>
      <link>https://community.esri.com/t5/arcpad-questions/referencing-controls/m-p/326656#M2393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What I think you're asking is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You reference a control in a form without issue, such as a button click firing-&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ThisEvent.Object (gives a reference to the button)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;or if it was the form's onload, the same thing would give a reference to the form itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So you want to reference a different control than the one that is getting its event fired, which could be done like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ThisEvent.Object.Parent.Controls("ControlName")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Adding the .Parent gives you a reference to the page (one heirarchy level up), or form (two heirarchies up) if you were to do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ThisEvent.Object.Parent.Parent &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then you could get a reference to the form, and once you can reference the form, access the other controls / pages the usual ways. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 15:08:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/referencing-controls/m-p/326656#M2393</guid>
      <dc:creator>EricHajek1</dc:creator>
      <dc:date>2010-08-03T15:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing controls</title>
      <link>https://community.esri.com/t5/arcpad-questions/referencing-controls/m-p/326657#M2394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Eric. I already got it yesterday! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ThisEvent.Object.Parent.Controls&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wish you had come my way before. I realy suffered with this for close to 2 weeks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Aug 2010 03:07:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/referencing-controls/m-p/326657#M2394</guid>
      <dc:creator>AtinLangoAL</dc:creator>
      <dc:date>2010-08-04T03:07:20Z</dc:date>
    </item>
  </channel>
</rss>

