<?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: trying to use button initiated sub forms instead of tabs...help in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/trying-to-use-button-initiated-sub-forms-instead/m-p/238766#M1747</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think to get your values to save to the point layer, you need to save them to the 'field'. Your current code is only saving the values to the control of your form (pPageH1.Controls("listdata").Value). Instead try saving the values to the field that is behind the control......like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ThisEvent.Layer.Forms("EDITFORM").Fields("%YourField%").Value = pPageH2.Controls("thing1").Value &amp;amp; ", " &amp;amp; pPageH2.Controls("thing2").value&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Dec 2010 12:31:50 GMT</pubDate>
    <dc:creator>EricMcPhee</dc:creator>
    <dc:date>2010-12-13T12:31:50Z</dc:date>
    <item>
      <title>trying to use button initiated sub forms instead of tabs...help</title>
      <link>https://community.esri.com/t5/arcpad-questions/trying-to-use-button-initiated-sub-forms-instead/m-p/238763#M1744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was hoping some one could help me with this form example....Instead of using tabs, I would like to use buttons to open sub forms. I would like the data to reside in those sub forms.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question 1 see illustration: The data selected (A or B) in the subform fields will not save to my pointlayer. It seems that my pointlayer will not link to the fields populated in the subform. How do I fix this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question 2 see illustration: I would like the fields of data to stay in the subform but display for quick user reference in the fields on the main form. For example on 'onok' I would need to have the fields in the subform build a string to display in the parent form. Any ideas on this? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code apl&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;LAYER name="pointlayer.shp" autopack="false"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;FORMS&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;EDITFORM name="EDITFORM" caption="Pointlayer" width="130" height="130" tabsvisible="true" picturepagevisible="false" symbologypagevisible="false" geographypagevisible="true" attributespagevisible="false" backgroundcolor="Green"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;PAGE name="pgViewer" caption="View"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;LISTBOX name="listData" x="50" y="2" width="50" height="12" defaultvalue="" tabstop="true" border="true"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;BUTTON name="cmdAdd" x="1" y="2" width="30" height="14" onclick="Call OpenAddNew1" caption="Site1" tabstop="true" alignment="center"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;LISTBOX name="listData2" x="50" y="20" width="50" height="12" defaultvalue="" tabstop="true" border="true"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;BUTTON name="cmdAdd2" x="1" y="20" width="30" height="14" onclick="Call OpenAddNew2" caption="Site1" tabstop="true" alignment="center"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/PAGE&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/EDITFORM&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;FORM name="frmAddNew" caption="Site1" width="130" height="80" tabsvisible="false"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;PAGE name="PAGE1" caption="page1" page="page1" backgroundcolor="white"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;LABEL name="LABEL29" caption="thing1" x="3" y="3" width="25" height="12" tooltip=""/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;COMBOBOX name="thing1" field="thing1" x="25" y="2" width="30" height="12" border="true" tabstop="true" tooltip="" limittolist="false"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;LISTITEM value="A" text="A"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;LISTITEM value="B" text="B"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/COMBOBOX&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;LABEL name="LABEL30" caption="thing2" x="3" y="20" width="25" height="12" tooltip=""/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;COMBOBOX name="thing2" field="thing2" x="25" y="20" width="30" height="12" border="true" tabstop="true" tooltip="" limittolist="false"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;LISTITEM value="A" text="A"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;LISTITEM value="B" text="B"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/COMBOBOX&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/PAGE&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/FORM&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/FORMS&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code vbs&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Option Explicit&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub OpenAddNew1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim aForm&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; set aForm=Application.Map.Layers("pointlayer").Forms("frmAddNew")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; aForm.Show&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 16:18:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/trying-to-use-button-initiated-sub-forms-instead/m-p/238763#M1744</guid>
      <dc:creator>markfarina</dc:creator>
      <dc:date>2010-12-09T16:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: trying to use button initiated sub forms instead of tabs...help</title>
      <link>https://community.esri.com/t5/arcpad-questions/trying-to-use-button-initiated-sub-forms-instead/m-p/238764#M1745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, I figured out question 2 on my previous post.&amp;nbsp; I inserted onok="Call WriteToField1" from the apl subform and used the script below in the vbs. This puts the subform combobox items into a string on the main form for display.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And also changed the display field from listbox to edit field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub WriteToField1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim obj&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set obj = ThisEvent.Object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If Not obj.Mode = 1 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pPageH1, pPageH2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set pPageH1 = ThisEvent.Layer.Forms("EDITFORM").Pages("pgViewer")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set pPageH2 = ThisEvent.Layer.Forms("frmAddNew").Pages("page1")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pPageH1.Controls("listdata").Value = pPageH2.Controls("thing1").Value &amp;amp; ", " &amp;amp; pPageH2.Controls("thing2").value &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2010 13:50:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/trying-to-use-button-initiated-sub-forms-instead/m-p/238764#M1745</guid>
      <dc:creator>markfarina</dc:creator>
      <dc:date>2010-12-10T13:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: trying to use button initiated sub forms instead of tabs...help</title>
      <link>https://community.esri.com/t5/arcpad-questions/trying-to-use-button-initiated-sub-forms-instead/m-p/238765#M1746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Still cannot figure out why the fields in the subform comboboxs will not save to the associated field in the pointlayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anybody know how to do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2010 13:53:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/trying-to-use-button-initiated-sub-forms-instead/m-p/238765#M1746</guid>
      <dc:creator>markfarina</dc:creator>
      <dc:date>2010-12-10T13:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: trying to use button initiated sub forms instead of tabs...help</title>
      <link>https://community.esri.com/t5/arcpad-questions/trying-to-use-button-initiated-sub-forms-instead/m-p/238766#M1747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think to get your values to save to the point layer, you need to save them to the 'field'. Your current code is only saving the values to the control of your form (pPageH1.Controls("listdata").Value). Instead try saving the values to the field that is behind the control......like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ThisEvent.Layer.Forms("EDITFORM").Fields("%YourField%").Value = pPageH2.Controls("thing1").Value &amp;amp; ", " &amp;amp; pPageH2.Controls("thing2").value&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Dec 2010 12:31:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/trying-to-use-button-initiated-sub-forms-instead/m-p/238766#M1747</guid>
      <dc:creator>EricMcPhee</dc:creator>
      <dc:date>2010-12-13T12:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: trying to use button initiated sub forms instead of tabs...help</title>
      <link>https://community.esri.com/t5/arcpad-questions/trying-to-use-button-initiated-sub-forms-instead/m-p/238767#M1748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Eric, (or anyone) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wasn't able to get this code to work out for my problem....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So what your saying is I need to assign the two combobox selections (thing1,thing2) which are on the subform to fields so they will save to the pointlayer? They are currently only controls?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The script I used.....(pPageH1.Controls("listdata").Value = pPageH2.Controls("thing1").Value &amp;amp; ", " &amp;amp; pPageH2.Controls("thing2").value)....strings the the thing1 and thing2 values into a field called listdata on the main form.&amp;nbsp; This does what I need it to do and is intended to display a summary to the user only.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just need "thing1" and "thing2" comboboxs in the subform to save to their correct fields in the pointlayer.&amp;nbsp; I would think they would need to save to some sort of temporary hidden field because there are no individual edit boxs for thing1 and thing2 on the main form....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Dec 2010 14:18:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/trying-to-use-button-initiated-sub-forms-instead/m-p/238767#M1748</guid>
      <dc:creator>markfarina</dc:creator>
      <dc:date>2010-12-13T14:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: trying to use button initiated sub forms instead of tabs...help</title>
      <link>https://community.esri.com/t5/arcpad-questions/trying-to-use-button-initiated-sub-forms-instead/m-p/238768#M1749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In you WritetoField1 sub routine, you need to set the values for the "fields" (thing1 and thing2). Try this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub WriteToField1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim obj&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set obj = ThisEvent.Object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If Not obj.Mode = 1 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pPageH1, pPageH2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'set a reference to the fields...these need to be the actuall field names in your data (shapefile of .axf)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dim T1, T2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set T1 = ThisEvent.Layer.Forms("EDITFORM").Fields("thing1")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set T2 = ThisEvent.Layer.Forms("EDITFORM").Fields("thing2")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Set pPageH1 = ThisEvent.Layer.Forms("EDITFORM").Pages("pgViewer" )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set pPageH2 = ThisEvent.Layer.Forms("frmAddNew").Pages("page1")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pPageH1.Controls("listdata").Value = pPageH2.Controls("thing1").Value &amp;amp; ", " &amp;amp; pPageH2.Controls("thing2").value &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'set the values of the fields thing1 and thing2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;T1.value = pPageH2.Controls("thing1").Value &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;T2.value = pPageH2.Controls("thing2").value &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I realize this code looks crude, but it should give you the idea.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Dec 2010 14:42:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/trying-to-use-button-initiated-sub-forms-instead/m-p/238768#M1749</guid>
      <dc:creator>EricMcPhee</dc:creator>
      <dc:date>2010-12-13T14:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: trying to use button initiated sub forms instead of tabs...help</title>
      <link>https://community.esri.com/t5/arcpad-questions/trying-to-use-button-initiated-sub-forms-instead/m-p/238769#M1750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Eric!&amp;nbsp; That did the trick.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Dec 2010 14:47:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/trying-to-use-button-initiated-sub-forms-instead/m-p/238769#M1750</guid>
      <dc:creator>markfarina</dc:creator>
      <dc:date>2010-12-14T14:47:02Z</dc:date>
    </item>
  </channel>
</rss>

