<?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: Writing to dbf file and clearing form fields in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220984#M1634</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Clearing a combobox will remove the listvalues. If you only want to "clear" the entry, you have to write&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pControl.ListIndex = -1 instead of the pControl.Clear statement&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rolf&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Nov 2010 07:07:34 GMT</pubDate>
    <dc:creator>RolfBroch</dc:creator>
    <dc:date>2010-11-26T07:07:34Z</dc:date>
    <item>
      <title>Writing to dbf file and clearing form fields</title>
      <link>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220978#M1628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I'm developing a subform for vegetation data collection in which, following completion of the subform, I want to write to a dbf file and then clear all fields in the subform in preparation for entering another record. (I have another sub which I use for the last record entered which writes to dbf and closes the subform). I can get the data written to the dbf file OK, and can enter subsequent records OK which again writes to the dbf file, however it won't clear the form. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically, I the subform is called "Plot Disturbance" into which data is entered in fields via combo boxes&amp;nbsp; a text box. I then have a button which, when clicked, calls up a Sub called "WritetoSubFormPlotDist". This reads the subform field contents into dbf fields called "OID" (a reference to the site number), "Disturbance Type", "Severity", Age" and "Observed evidence". Because there may be a number of disturbances (records) at each site, I then want to enter the next disturbance type using the same subform and it would be very useful if the form cleared between record exports. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The text I am using is as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub WritetoSubFormPlotDist&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Set page = editform.pages.item("PgPlotDist")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Dim myRS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Set myRS = Application.CreateAppObject("RecordSet")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; 'open the Plot Disturbance DBF-file &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; myRS.Open "P:\Work\SSD\Users\Huxtac\ArcPad Stuff\Veg_16\Plot_DistOut.dbf",2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; myRS.AddNew 'adds a new record&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; myRS.Fields("OID").Value = layer.Forms("EDITFORM").Pages("General1").Controls("OID")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; myRS.Fields("DIST_TYPE").Value = layer.Forms("FrmPlotDist").Pages("PgPlotDist").Controls("CboDistType")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; myRS.Fields("SEVERITY").Value = layer.Forms("FrmPlotDist").Pages("PgPlotDist").Controls("CboSevCode")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; myRS.Fields("AGE").Value = layer.Forms("FrmPlotDist").Pages("PgPlotDist").Controls("CboAgeCode")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; myRS.Fields("OBS_EVID").Value = layer.Forms("FrmPlotDist").Pages("PgPlotDist").Controls("EdtObsEvid")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; myRS.Update 'saves information to the recordset Land Use DBF-file&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; myRS.Close&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Set myRS = Nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Set page = editform.pages.item("PgPlotDist").Clear&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas - I've spent several days on this and it's driving me crazy! I thought that "MyRS.Clear" might work, but no!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Charles&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 04:07:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220978#M1628</guid>
      <dc:creator>CharlesHuxtable</dc:creator>
      <dc:date>2010-11-12T04:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to dbf file and clearing form fields</title>
      <link>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220979#M1629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Charles, the page object does not have a clear request. You have to clear your controls manually by for example calling a sub like the one below by replacing the statement&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Set page = editform.pages.item("PgPlotDist").Clear&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;with&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Call ClearControls(page)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub ClearControls(byRef pPage)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Dim pControl&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; For each pControl in pPage.Controls&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If pControl.Type = "COMBOBOX" Or pControl.Type = "LISTBOX" Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pControl.Clear&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ElseIf pControl.Type = "EDIT" Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pControl.Value = ""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Next&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Set pControl = Nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rolf&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS, I did not check to see if the code above works (but is should)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 12:33:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220979#M1629</guid>
      <dc:creator>RolfBroch</dc:creator>
      <dc:date>2010-11-12T12:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to dbf file and clearing form fields</title>
      <link>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220980#M1630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Rolf, thanks for your help with this, however I tried what you suggested but couldn't get it to work - I may be doing something wrong. Just to clarify:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Do I take your meaning that I need to call a separate Sub to clear the form, rather than a sub operating within the Sub "WritetoSubFormPlotDist", ie I would add a button in my form which,when clicked, would call the sub to clear the form? If so, should the Sub be called "ClearControls(page)" or "ClearControls(byRefpPage)"?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Should I use the "pPage" or substitute the name of my form page, ie. "PgPlotDist"?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not experienced with VB, so please excuse my poor understanding!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Nov 2010 23:16:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220980#M1630</guid>
      <dc:creator>CharlesHuxtable</dc:creator>
      <dc:date>2010-11-14T23:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to dbf file and clearing form fields</title>
      <link>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220981#M1631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi again. Sorry for not being clearer. You can add the following code&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pControl&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For each pControl in page.Controls&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; If pControl.Type = "COMBOBOX" Or pControl.Type = "LISTBOX" Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pControl.Clear&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ElseIf pControl.Type = "EDIT" Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pControl.Value = ""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set pControl = Nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;into your own routine instead of your statement&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Set page = editform.pages.item("PgPlotDist").Clear&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using a subroutine for this was only if you needed to do this several places in your code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rolf&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Nov 2010 06:02:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220981#M1631</guid>
      <dc:creator>RolfBroch</dc:creator>
      <dc:date>2010-11-19T06:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to dbf file and clearing form fields</title>
      <link>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220982#M1632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Rolf, thanks for your help. I got it to work with the code you suggested. The only problem was that, after clearing the form, the drop down lists did not appear when I tried to enter the next record. Thus it appeared that the "clear" command somehow removed the "combobox" function from each field in the form. The code is as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub WritetoSubFormPlotDist&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set page = editform.pages.item("PgPlotDist")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'open the Plot Disturbance DBF-file&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Dim myRS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set myRS = Application.CreateAppObject("RecordSet")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;myRS.Open "P:\Work\SSD\Users\Huxtac\ArcPad Stuff\Veg_16\Plot_DistOut.dbf",2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;myRS.AddNew 'adds a new record&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;myRS.Fields("OID").Value = layer.Forms("EDITFORM").Pages("General1").Controls("OID")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;myRS.Fields("DIST_TYPE").Value = layer.Forms("FrmPlotDist").Pages("PgPlotDist").Controls("CboDistType")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; myRS.Fields("SEVERITY").Value = layer.Forms("FrmPlotDist").Pages("PgPlotDist").Controls("CboSevCode")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; myRS.Fields("AGE").Value = layer.Forms("FrmPlotDist").Pages("PgPlotDist").Controls("CboAgeCode")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; myRS.Fields("OBS_EVID").Value = layer.Forms("FrmPlotDist").Pages("PgPlotDist").Controls("EdtObsEvid")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;myRS.Update 'saves information to the recordset Land Use DBF-file&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;myRS.Close&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set myRS = Nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pControl&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; For each pControl in layer.Forms("FrmPlotDist").Pages("PgPlotDist").Controls&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; If pControl.Type = "COMBOBOX" Or pControl.Type = "LISTBOX" Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pControl.Clear&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ElseIf pControl.Type = "EDIT" Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pControl.Value = ""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set pControl = Nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to clear the form without removing the combobox drop-down lists?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Charles&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Nov 2010 01:45:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220982#M1632</guid>
      <dc:creator>CharlesHuxtable</dc:creator>
      <dc:date>2010-11-23T01:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to dbf file and clearing form fields</title>
      <link>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220983#M1633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Rolf,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for your help. I got it to work with the code below as you suggested. I was able to fill out the form and click an "Add New" button, which calls the subroutine "WritetoSubFormPlotDist", which writes the data to a dbf file and clears the form for the next entry, which it did successfully. The only problem was, when I tried to enter the next record, the drop down lists had disappeaerd from the comboboxes. Any ideas?? Charles&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub WritetoSubFormPlotDist&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Set page = editform.pages.item("PgPlotDist")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'open the Plot Disturbance DBF-file&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Dim myRS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Set myRS = Application.CreateAppObject("RecordSet")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; myRS.Open "P:\Work\SSD\Users\Huxtac\ArcPad Stuff\Veg_16\Plot_DistOut.dbf",2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; myRS.AddNew 'adds a new record&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; myRS.Fields("OID").Value = layer.Forms("EDITFORM").Pages("General1").Controls("OID")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; myRS.Fields("DIST_TYPE").Value = layer.Forms("FrmPlotDist").Pages("PgPlotDist").Controls("CboDistType")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; myRS.Fields("SEVERITY").Value = layer.Forms("FrmPlotDist").Pages("PgPlotDist").Controls("CboSevCode")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; myRS.Fields("AGE").Value = layer.Forms("FrmPlotDist").Pages("PgPlotDist").Controls("CboAgeCode")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; myRS.Fields("OBS_EVID").Value = layer.Forms("FrmPlotDist").Pages("PgPlotDist").Controls("EdtObsEvid")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; myRS.Update 'saves information to the recordset Land Use DBF-file&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; myRS.Close&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Set myRS = Nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim pControl&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; For each pControl in layer.Forms("FrmPlotDist").Pages("PgPlotDist").Controls&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; If pControl.Type = "COMBOBOX" Or pControl.Type = "LISTBOX" Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pControl.Clear&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ElseIf pControl.Type = "EDIT" Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pControl.Value = ""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pControl = Nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Nov 2010 01:57:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220983#M1633</guid>
      <dc:creator>CharlesHuxtable</dc:creator>
      <dc:date>2010-11-23T01:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to dbf file and clearing form fields</title>
      <link>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220984#M1634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Clearing a combobox will remove the listvalues. If you only want to "clear" the entry, you have to write&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pControl.ListIndex = -1 instead of the pControl.Clear statement&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rolf&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Nov 2010 07:07:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220984#M1634</guid>
      <dc:creator>RolfBroch</dc:creator>
      <dc:date>2010-11-26T07:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to dbf file and clearing form fields</title>
      <link>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220985#M1635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Rolf - all working now&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Charles&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Dec 2010 03:23:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/writing-to-dbf-file-and-clearing-form-fields/m-p/220985#M1635</guid>
      <dc:creator>CharlesHuxtable</dc:creator>
      <dc:date>2010-12-01T03:23:30Z</dc:date>
    </item>
  </channel>
</rss>

