<?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: subforms will not clear in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/subforms-will-not-clear/m-p/152004#M1076</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, you could do something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Dim page, objForm, control
objForm = ThisEvent.Object 
'This assumes you're firing this sub from a form-level onload event, you could also just get a direct
'reference or leave the form-level out of it and just use the page-level stuff if you want to do it on a 
'per-page basis

For each page in objForm.Pages
 page.Activate
 For each control in page.Controls
&amp;nbsp; If control.Type = "COMBOBOX" Then
&amp;nbsp;&amp;nbsp; control.Clear
&amp;nbsp;&amp;nbsp; control.value = ""
&amp;nbsp; ElseIf control.Type = "EDIT" Then
&amp;nbsp;&amp;nbsp; control.value = ""
&amp;nbsp; End If
 Next
Next
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have some radio buttons or checkboxes, you can add more ways to handle it by adding onto the If Then cascade. Credit goes to whoever originally posted the above sub in these forums, I was also doing it "the hard way" before I realized I could use the control and page collection objects this way. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 08:09:04 GMT</pubDate>
    <dc:creator>EricHajek1</dc:creator>
    <dc:date>2021-12-11T08:09:04Z</dc:date>
    <item>
      <title>subforms will not clear</title>
      <link>https://community.esri.com/t5/arcpad-questions/subforms-will-not-clear/m-p/152002#M1074</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 created this form (EDITFORM) with buttons that open subforms (ADDNEWHORIZON1, ADDNEWHORIZON2, etc) that have comboboxs and edit fields. The problem I am having, is that when I create a new point feature the subforms are populated with the previous point feature values.&amp;nbsp; The controls don't clear themselves.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I fix 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>Wed, 15 Dec 2010 15:29:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/subforms-will-not-clear/m-p/152002#M1074</guid>
      <dc:creator>markfarina</dc:creator>
      <dc:date>2010-12-15T15:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: subforms will not clear</title>
      <link>https://community.esri.com/t5/arcpad-questions/subforms-will-not-clear/m-p/152003#M1075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is the solution to my problem. Does anyone know if all controls can be cleared at the page level instead of each individual contol???&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Called on the onload event for subform1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub InitH7&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim FC &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set FC=Application.Map.Layers("pointlayer").Forms("AddNewHorizon1").Pages.Item("PAGE1")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'clear control values &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; FC.Controls.Item("H7").Value=""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FC.Controls.Item("H7TDepth").Value=""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FC.Controls.Item("H7BDepth").Value=""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Dec 2010 12:48:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/subforms-will-not-clear/m-p/152003#M1075</guid>
      <dc:creator>markfarina</dc:creator>
      <dc:date>2010-12-20T12:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: subforms will not clear</title>
      <link>https://community.esri.com/t5/arcpad-questions/subforms-will-not-clear/m-p/152004#M1076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, you could do something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Dim page, objForm, control
objForm = ThisEvent.Object 
'This assumes you're firing this sub from a form-level onload event, you could also just get a direct
'reference or leave the form-level out of it and just use the page-level stuff if you want to do it on a 
'per-page basis

For each page in objForm.Pages
 page.Activate
 For each control in page.Controls
&amp;nbsp; If control.Type = "COMBOBOX" Then
&amp;nbsp;&amp;nbsp; control.Clear
&amp;nbsp;&amp;nbsp; control.value = ""
&amp;nbsp; ElseIf control.Type = "EDIT" Then
&amp;nbsp;&amp;nbsp; control.value = ""
&amp;nbsp; End If
 Next
Next
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have some radio buttons or checkboxes, you can add more ways to handle it by adding onto the If Then cascade. Credit goes to whoever originally posted the above sub in these forums, I was also doing it "the hard way" before I realized I could use the control and page collection objects this way. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:09:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/subforms-will-not-clear/m-p/152004#M1076</guid>
      <dc:creator>EricHajek1</dc:creator>
      <dc:date>2021-12-11T08:09:04Z</dc:date>
    </item>
  </channel>
</rss>

