<?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 Related Table Error on New Feature Creation in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/related-table-error-on-new-feature-creation/m-p/473567#M3380</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;.................&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Apr 2010 12:28:32 GMT</pubDate>
    <dc:creator>JayKappy</dc:creator>
    <dc:date>2010-04-29T12:28:32Z</dc:date>
    <item>
      <title>Related Table Error on New Feature Creation</title>
      <link>https://community.esri.com/t5/arcpad-questions/related-table-error-on-new-feature-creation/m-p/473564#M3377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an app that I was running a single feature class update on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was able to add points no problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I then related a table to the feature class&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I added some code that will allow the user to add some data in some textboxes and then click a save button, this will then add the record to the related table (instead of using the bulky related table entry form)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I add the point now I get an error that the column cannot contain a null value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I assume that this is the field that being used as the primary key between the feature class and the related table???&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I click OK to the error it goes away and allows me to continue. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I then look at the related table in the form I can see that there is no vlaue there for the primary key field....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I then enter my data on the form and then click a save button...this prompts some code that sends a SQL statement and adds a record in the related table. This works fine....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ALTHOUGH IF I click on a existing feature class point I do not get this error, even if there are no records in the related table...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any one have any thoughts as to what can be firing this error....which seems to only be fired when I add a new feature...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It errors on the red below....what I am doin before the update is getting a varaible which was set on app open and finding the highest record value to create a Unique ID....The Update fails, ALTHOUGH the code still runs and returns the two values just mentioned to the form.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I really dont knwo whats going on here......thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;THanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
'....snip

Dim objRS1, objEFPageOneControls, objEditForm,&amp;nbsp; objEFPageTwoControls, objSelLayer1
Set objSelLayer1 = Map.SelectionLayer
Set objRS1 = objSelLayer1.Records

objRS1.Bookmark = Map.SelectionBookmark

Set objEditForm = application.map.layers("Retaining_Walls").forms("EDITFORM")
Set objEFPageOneControls = objEditForm.Pages("page1").Controls

objEFPageOneControls("txtUniqueID").Value = MaxID2

Dim selectedUser
selectedUser = Application.UserProperties("LoggedInEmployee")&amp;nbsp;&amp;nbsp;&amp;nbsp; 

objEFPageOneControls("cbo_User").Value = selectedUser
objEFPageOneControls("cbo_User").Enabled = False
objEFPageOneControls("txtUniqueID").Enabled = False

objRS1.Update
Set objRS1 = Nothing

'....snip&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:31:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/related-table-error-on-new-feature-creation/m-p/473564#M3377</guid>
      <dc:creator>JayKappy</dc:creator>
      <dc:date>2021-12-12T16:31:16Z</dc:date>
    </item>
    <item>
      <title>Related Table Error on New Feature Creation</title>
      <link>https://community.esri.com/t5/arcpad-questions/related-table-error-on-new-feature-creation/m-p/473565#M3378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I remove the related table and KEEP all the code I have the error goes away....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why is a related table causing the error when I go to add another feature?????&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or is it something else that I am missing....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can I turn errors off until the update is done adn then turn them on Again?&amp;nbsp; I dotn watn to do this but I need a fix.....&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, 28 Apr 2010 15:38:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/related-table-error-on-new-feature-creation/m-p/473565#M3378</guid>
      <dc:creator>JayKappy</dc:creator>
      <dc:date>2010-04-28T15:38:50Z</dc:date>
    </item>
    <item>
      <title>Related Table Error on New Feature Creation</title>
      <link>https://community.esri.com/t5/arcpad-questions/related-table-error-on-new-feature-creation/m-p/473566#M3379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I can update an existing record fine, and write to the related table with my SQL code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I error when I add a new Feature (same code), says "The Column Cannot contain null values"&amp;nbsp; This has to be because The record is not yet in the related table (my unique Value), and the relate is confused &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I cancel the error and run my code the record is not updated/created in the related table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Although if I go into the related table tab and click it asks me if I want to add a record, I say yes and it brings across my Uniqe Value and allows the user to input the new related record.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am confused here....could it be my Primary Key, or is it the OBJECTID????&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I add a point do I have to create a new related table record right off the bat?&amp;nbsp; Where as if I already have a feature I created the relation to the related table?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Apr 2010 17:01:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/related-table-error-on-new-feature-creation/m-p/473566#M3379</guid>
      <dc:creator>JayKappy</dc:creator>
      <dc:date>2010-04-28T17:01:07Z</dc:date>
    </item>
    <item>
      <title>Related Table Error on New Feature Creation</title>
      <link>https://community.esri.com/t5/arcpad-questions/related-table-error-on-new-feature-creation/m-p/473567#M3380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;.................&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Apr 2010 12:28:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/related-table-error-on-new-feature-creation/m-p/473567#M3380</guid>
      <dc:creator>JayKappy</dc:creator>
      <dc:date>2010-04-29T12:28:32Z</dc:date>
    </item>
  </channel>
</rss>

