<?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 Auto populate values in related table - PLEASE HELP! in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/auto-populate-values-in-related-table-please-help/m-p/245443#M1793</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 am having some trouble inserting values into a related table in ArcPad 10.&amp;nbsp; Once an existing facility is selected from the map, I would like to auto populate the related table (DA_FORM) with values from the GIS feature attribute table.&amp;nbsp; I am not a programmer by any means, so please excuse my ignorance here!&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can select the appropriate values from the GIS feature, but am having trouble executing the SQL statement.&amp;nbsp; I get an error on the execute SQL line saying, "the column cannot contain null values. [,,,Column Name, Table Name,]"&amp;nbsp; Here's what I have so far:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(onformload event)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub AutoPop&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dim objSelLyr, objSelRS, StrFacilNo, StrStructName&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;set objSelLyr = Application.Map.SelectionLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set objSelRS = objSelLyr.Records&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;objSelRS.Bookmark = Map.SelectionBookmark&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Get values from structure_existing_area layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;StrFacilNo = objSelRS.Fields("facil_no").Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;StrStructName = objSelRS.Fields("structname").Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;msgbox ("Facility # is " &amp;amp; StrFacilNo &amp;amp; ": " &amp;amp; StrStructName)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim DS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim SQL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim Result&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Set data source &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Set DS = objSelLyr.DataSource&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Define SQL statement to insert values into table DA_FORM&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SQL = "INSERT INTO DA_FORM (facil_no, facil_type) VALUES ('" &amp;amp; StrFacilNo &amp;amp; "', '" &amp;amp; StrStructName &amp;amp; "')"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Execute SQL command&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Result = DS.Execute(SQL)&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>Sun, 14 Aug 2011 19:13:28 GMT</pubDate>
    <dc:creator>MatthewWilson1</dc:creator>
    <dc:date>2011-08-14T19:13:28Z</dc:date>
    <item>
      <title>Auto populate values in related table - PLEASE HELP!</title>
      <link>https://community.esri.com/t5/arcpad-questions/auto-populate-values-in-related-table-please-help/m-p/245443#M1793</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 am having some trouble inserting values into a related table in ArcPad 10.&amp;nbsp; Once an existing facility is selected from the map, I would like to auto populate the related table (DA_FORM) with values from the GIS feature attribute table.&amp;nbsp; I am not a programmer by any means, so please excuse my ignorance here!&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can select the appropriate values from the GIS feature, but am having trouble executing the SQL statement.&amp;nbsp; I get an error on the execute SQL line saying, "the column cannot contain null values. [,,,Column Name, Table Name,]"&amp;nbsp; Here's what I have so far:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(onformload event)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub AutoPop&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dim objSelLyr, objSelRS, StrFacilNo, StrStructName&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;set objSelLyr = Application.Map.SelectionLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set objSelRS = objSelLyr.Records&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;objSelRS.Bookmark = Map.SelectionBookmark&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Get values from structure_existing_area layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;StrFacilNo = objSelRS.Fields("facil_no").Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;StrStructName = objSelRS.Fields("structname").Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;msgbox ("Facility # is " &amp;amp; StrFacilNo &amp;amp; ": " &amp;amp; StrStructName)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim DS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim SQL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim Result&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Set data source &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Set DS = objSelLyr.DataSource&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Define SQL statement to insert values into table DA_FORM&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SQL = "INSERT INTO DA_FORM (facil_no, facil_type) VALUES ('" &amp;amp; StrFacilNo &amp;amp; "', '" &amp;amp; StrStructName &amp;amp; "')"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Execute SQL command&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Result = DS.Execute(SQL)&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>Sun, 14 Aug 2011 19:13:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/auto-populate-values-in-related-table-please-help/m-p/245443#M1793</guid>
      <dc:creator>MatthewWilson1</dc:creator>
      <dc:date>2011-08-14T19:13:28Z</dc:date>
    </item>
  </channel>
</rss>

