<?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 Filling in atrributes for a point layer from a underlying polygon layer in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214363#M1552</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using the following script to grab parcel and address information from one layer to fill the attribute table of a newly created feature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is no returned error, but the problem I am having is that there seems to be the wrong information stuck in the memory of recordselect function.&amp;nbsp; No matter where I place a point it gives the same parcel # and address. Or maybe it isn???t actually be performing the IF function properly.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub Address&lt;/SPAN&gt;&lt;BR /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim rsCurrentXY&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set rsCurrentXY = Map.Layers("Violations").records&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; rsCurrentXY.movelast&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim objXYShape&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objXYShape = rsCurrentXY.Fields.Shape&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pControls&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pControls= Application.Map.selectionlayer.Forms("EDITFORM").Pages(???PAGE1???).Controls&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim rsGrid&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;&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; ' Find corresponding map page to the valve point&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set rsGrid = Map.Layers("ACPA_parcels").records&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; rsGrid.movefirst&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do While Not rsGrid.eof&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;&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; If rsGrid.fields.shape.Ispointin(objXYShape) Then&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;&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;&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; pControls("txtAddress").value = rsGrid.Fields("ADD1").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;&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;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Do&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;&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; End If&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;&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; rsGrid.Movenext&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Loop&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Clean Up&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set rsCurrentXY = Nothing&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objXYShape = Nothing&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set rsGrid = Nothing&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;(I have another subroutine called "PIN" that would do the exact same thing.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have them called when their respective edit boxes in the custom form are activated by the inspector.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Robert&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Aug 2012 19:33:35 GMT</pubDate>
    <dc:creator>BretWhiteley1</dc:creator>
    <dc:date>2012-08-28T19:33:35Z</dc:date>
    <item>
      <title>Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214363#M1552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using the following script to grab parcel and address information from one layer to fill the attribute table of a newly created feature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is no returned error, but the problem I am having is that there seems to be the wrong information stuck in the memory of recordselect function.&amp;nbsp; No matter where I place a point it gives the same parcel # and address. Or maybe it isn???t actually be performing the IF function properly.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub Address&lt;/SPAN&gt;&lt;BR /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim rsCurrentXY&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set rsCurrentXY = Map.Layers("Violations").records&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; rsCurrentXY.movelast&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim objXYShape&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objXYShape = rsCurrentXY.Fields.Shape&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pControls&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pControls= Application.Map.selectionlayer.Forms("EDITFORM").Pages(???PAGE1???).Controls&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim rsGrid&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;&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; ' Find corresponding map page to the valve point&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set rsGrid = Map.Layers("ACPA_parcels").records&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; rsGrid.movefirst&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do While Not rsGrid.eof&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;&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; If rsGrid.fields.shape.Ispointin(objXYShape) Then&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;&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;&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; pControls("txtAddress").value = rsGrid.Fields("ADD1").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;&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;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Do&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;&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; End If&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;&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; rsGrid.Movenext&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Loop&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Clean Up&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set rsCurrentXY = Nothing&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objXYShape = Nothing&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set rsGrid = Nothing&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;(I have another subroutine called "PIN" that would do the exact same thing.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have them called when their respective edit boxes in the custom form are activated by the inspector.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Robert&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 19:33:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214363#M1552</guid>
      <dc:creator>BretWhiteley1</dc:creator>
      <dc:date>2012-08-28T19:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214364#M1553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would place the subroutine under InitializeForm(), when the edit form loads.&amp;nbsp; And since this will be called each time a newly feature created, you would want it under "objEditForm.Mode = 3"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, try to call this subroutine from Form: onload event:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
'Initialization for form when adding new records:
'&amp;nbsp; When the user clicks on the map, this sets up the form.
'&amp;nbsp; Call routine to automatically population some fields.
'&amp;nbsp; Enable or disable controls base on data collection procedure.

Sub InitializeForm
 Dim pLayer, objEditForm
 Set pLayer = Map.Layers("Violations")&amp;nbsp; 
&amp;nbsp;&amp;nbsp; Set objEditForm = pLayer.forms("EDITFORM")

 Dim rsCurrentXY
 Set rsCurrentXY = Map.Layers("Violations").records
 rsCurrentXY.movelast

 Dim objXYShape
 Set objXYShape = rsCurrentXY.Fields.Shape

 Dim pControls
 Set pControls= ThisEvent.Object.Pages("PAGE1").Controls

 'Call when adding a new feature
 If objEditForm.Mode = 3 Then
&amp;nbsp; pControls("txtAddress").value = ""

&amp;nbsp; ' Find corresponding map page to the valve point
&amp;nbsp; Set rsGrid = Map.Layers("ACPA_parcels").records
&amp;nbsp; rsGrid.movefirst
 
&amp;nbsp; Do While Not rsGrid.eof
&amp;nbsp;&amp;nbsp; If rsGrid.fields.shape.Ispointin(objXYShape) Then
&amp;nbsp;&amp;nbsp;&amp;nbsp; pControls("txtAddress").value = rsGrid.Fields("ADD1").Value
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Do
&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp; rsGrid.Movenext
&amp;nbsp; Loop 

&amp;nbsp; ' Clean Up
&amp;nbsp; Set rsCurrentXY = Nothing
&amp;nbsp; Set objXYShape = Nothing
&amp;nbsp; Set rsGrid = Nothing
 End If
 Set pControls = Nothing
 Set objEditForm = Nothing
 Set pLayer = Nothing
End Sub
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:30:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214364#M1553</guid>
      <dc:creator>ThaiTruong</dc:creator>
      <dc:date>2021-12-11T10:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214365#M1554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;GREAT HELP, ttruong!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I am still at the same problem. It is auto filling in with the same attributes no matter where I click. Perhaps the Ispointin() portion is not actually working?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 12:51:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214365#M1554</guid>
      <dc:creator>BretWhiteley1</dc:creator>
      <dc:date>2012-08-29T12:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214366#M1555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I would place the subroutine under InitializeForm(), when the edit form loads.&amp;nbsp; And since this will be called each time a newly feature created, you would want it under "objEditForm.Mode = 3"&lt;BR /&gt;&lt;BR /&gt;So, try to call this subroutine from Form: onload event:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
'Initialization for form when adding new records:
'&amp;nbsp; When the user clicks on the map, this sets up the form.
'&amp;nbsp; Call routine to automatically population some fields.
'&amp;nbsp; Enable or disable controls base on data collection procedure.

Sub InitializeForm
 Dim pLayer, objEditForm
 Set pLayer = Map.Layers("Violations")&amp;nbsp; 
&amp;nbsp;&amp;nbsp; Set objEditForm = pLayer.forms("EDITFORM")

 Dim rsCurrentXY
 Set rsCurrentXY = Map.Layers("Violations").records
 rsCurrentXY.movelast

 Dim objXYShape
 Set objXYShape = rsCurrentXY.Fields.Shape

 Dim pControls
 Set pControls= ThisEvent.Object.Pages("PAGE1").Controls

 'Call when adding a new feature
 If objEditForm.Mode = 3 Then
&amp;nbsp; pControls("txtAddress").value = ""

&amp;nbsp; ' Find corresponding map page to the valve point
&amp;nbsp; Set rsGrid = Map.Layers("ACPA_parcels").records
&amp;nbsp; rsGrid.movefirst
 
&amp;nbsp; Do While Not rsGrid.eof
&amp;nbsp;&amp;nbsp; If rsGrid.fields.shape.Ispointin(objXYShape) Then
&amp;nbsp;&amp;nbsp;&amp;nbsp; pControls("txtAddress").value = rsGrid.Fields("ADD1").Value
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Do
&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp; rsGrid.Movenext
&amp;nbsp; Loop 

&amp;nbsp; ' Clean Up
&amp;nbsp; Set rsCurrentXY = Nothing
&amp;nbsp; Set objXYShape = Nothing
&amp;nbsp; Set rsGrid = Nothing
 End If
 Set pControls = Nothing
 Set objEditForm = Nothing
 Set pLayer = Nothing
End Sub
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;GREAT HELP, ttruong!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I am still at the same problem. It is auto filling in with the same attributes no matter where I click. Perhaps the Ispointin() portion is not actually working?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:30:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214366#M1555</guid>
      <dc:creator>BretWhiteley1</dc:creator>
      <dc:date>2021-12-11T10:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214367#M1556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Rob,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Double check the indentation in your VBScript! I just did a quick test and the script returns the right value every time I add a new record (see the attached images)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]17324[/ATTACH][ATTACH=CONFIG]17325[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 13:38:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214367#M1556</guid>
      <dc:creator>ThaiTruong</dc:creator>
      <dc:date>2012-08-29T13:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214368#M1557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Rob,&lt;BR /&gt;&lt;BR /&gt;Double check the indentation in your VBScript! I just did a quick test and the script returns the right value every time I add a new record (see the attached images)&lt;BR /&gt;&lt;BR /&gt;[ATTACH=CONFIG]17324[/ATTACH][ATTACH=CONFIG]17325[/ATTACH]&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just did. Everything seems right.&amp;nbsp; Still get the same address and PIN. It is very strange.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is really strange about this is that this has worked before (the original script I posted) When I had it calling individual scripts on activating edit boxes.&amp;nbsp; All of the sudden it stopped filling properly.&amp;nbsp; Could this mean something is stuck in the memory of arcpad?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help. It is a much better script to have on formloadevent. But I can't get it to fill properly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;I just tried changing which field it is pulling from. It appears that no matter which field I use. The first place I click, those attributes, fill edit form for each subsequent point feature added.&amp;nbsp; So perhaps the "Clean up" functions are not doing their job.&lt;/STRONG&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 13:48:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214368#M1557</guid>
      <dc:creator>BretWhiteley1</dc:creator>
      <dc:date>2012-08-29T13:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214369#M1558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's strange!&amp;nbsp; Have you tried to create a new ArcPad document, and add the features back in to test?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Attached is my test data...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 14:05:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214369#M1558</guid>
      <dc:creator>ThaiTruong</dc:creator>
      <dc:date>2012-08-29T14:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214370#M1559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That's strange!&amp;nbsp; Have you tried to create a new ArcPad document, and add the features back in to test?&lt;BR /&gt;Attached is my test data...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just tried your suggestion. Created a whole new map document. Even updated the parcel layer to a more up-to-date version and it still fills in with the exact same incorrect address and pin. (the same incorrect info from the original map) This information is stuck in the memory somewhere (which is very odd). I am frustrated and I need this to be ready tomorrow at 9am.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm going to redo the whole thing.&amp;nbsp; Fresh check out of all the data and recreate the whole .apl and .vbs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unless you have any other ideas.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your commitment to helping,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Robert&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 14:25:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214370#M1559</guid>
      <dc:creator>BretWhiteley1</dc:creator>
      <dc:date>2012-08-29T14:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214371#M1560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Just tried your suggestion. Created a whole new map document. Even updated the parcel layer to a more up-to-date version and it still fills in with the exact same incorrect address and pin. (the same incorrect info from the original map) This information is stuck in the memory somewhere (which is very odd). I am frustrated and I need this to be ready tomorrow at 9am.&lt;BR /&gt;&lt;BR /&gt;I'm going to redo the whole thing.&amp;nbsp; Fresh check out of all the data and recreate the whole .apl and .vbs.&lt;BR /&gt;&lt;BR /&gt;Unless you have any other ideas.&lt;BR /&gt;&lt;BR /&gt;Thanks for your commitment to helping,&lt;BR /&gt;Robert&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is so strange. I have re-checked out all the data and created a new map document. I even tried it on a different computer. It simply won't work properly. The same address and pin get put in the form every time it opens no matter where i place the point. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone ever have experience like this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems like a problem with the record select. It isn't selecting the attributes from the Ispointin() function is it stuck on some other one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 16:56:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214371#M1560</guid>
      <dc:creator>BretWhiteley1</dc:creator>
      <dc:date>2012-08-29T16:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214372#M1561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This is so strange. I have re-checked out all the data and created a new map document. I even tried it on a different computer. It simply won't work properly. The same address and pin get put in the form every time it opens no matter where i place the point. &lt;BR /&gt;&lt;BR /&gt;Anyone ever have experience like this?&lt;BR /&gt;&lt;BR /&gt;It seems like a problem with the record select. It isn't selecting the attributes from the Ispointin() function is it stuck on some other one.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry to hear that!&amp;nbsp; Did my attached example work for you?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If it's not a big deal, post your 2 features, apl files, and vbs in here.&amp;nbsp; I'll try to look into it for you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 17:10:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214372#M1561</guid>
      <dc:creator>ThaiTruong</dc:creator>
      <dc:date>2012-08-29T17:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214373#M1562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Sorry to hear that!&amp;nbsp; Did my attached example work for you?&lt;BR /&gt;If it's not a big deal, post your 2 features, apl files, and vbs in here.&amp;nbsp; I'll try to look into it for you.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I figured out the problem!~ but not the solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So when I click to create a feature, the correct attribute fill in the table, BUT if I click Cancel rather than Ok to accept the new feature (something that could happen in the field if the inspector clicks the wrong place), when I click a new location the old locations attributes are still stuck in the record select and the form waiting to be accepted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So is there a way to code in "If the point doesn't get placed (the user clicks cancel) it clears all of the attributes stored"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PROGRESS!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;THANKS!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 17:26:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214373#M1562</guid>
      <dc:creator>BretWhiteley1</dc:creator>
      <dc:date>2012-08-29T17:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214374#M1563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I figured out the problem!~ but not the solution.&lt;BR /&gt;&lt;BR /&gt;So when I click to create a feature, the correct attribute fill in the table, BUT if I click Cancel rather than Ok to accept the new feature (something that could happen in the field if the inspector clicks the wrong place), when I click a new location the old locations attributes are still stuck in the record select and the form waiting to be accepted.&lt;BR /&gt;&lt;BR /&gt;So is there a way to code in "If the point doesn't get placed (the user clicks cancel) it clears all of the attributes stored"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;PROGRESS!!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;THANKS!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Form:OnCancel Event will do...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 17:34:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214374#M1563</guid>
      <dc:creator>ThaiTruong</dc:creator>
      <dc:date>2012-08-29T17:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214375#M1564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just a curiosity, did you toggle the "Repeat Attribute" button?!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I don't think it's matter because if you code it right, your address and pin values will be overwrited each time you place a new point!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 17:46:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214375#M1564</guid>
      <dc:creator>ThaiTruong</dc:creator>
      <dc:date>2012-08-29T17:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214376#M1565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Just a curiosity, did you toggle the "Repeat Attribute" button?!&lt;BR /&gt;&lt;BR /&gt;However, I don't think it's matter because if you code it right, your address and pin values will be overwrited each time you place a new point!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know where that button is. So I'm going to assume no.&amp;nbsp; Also, there are still kinks in it. I'm going to upload a folder for you to play with. I can't get the OnCancelEvent script to work properly either.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Give me 5 minutes. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Again, thanks so much. You are the only one in all of cyberspace who is helping me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 17:58:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214376#M1565</guid>
      <dc:creator>BretWhiteley1</dc:creator>
      <dc:date>2012-08-29T17:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214377#M1566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Just a curiosity, did you toggle the "Repeat Attribute" button?!&lt;BR /&gt;&lt;BR /&gt;However, I don't think it's matter because if you code it right, your address and pin values will be overwrited each time you place a new point!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Attached is the .apx file with the code in it. You can make you your own polygon layer. The parcel layer is too large to send unless you have dropbox or something similar.&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, 29 Aug 2012 18:19:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214377#M1566</guid>
      <dc:creator>BretWhiteley1</dc:creator>
      <dc:date>2012-08-29T18:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214378#M1567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Attached is the .apx file with the code in it. You can make you your own polygon layer. The parcel layer is too large to send unless you have dropbox or something similar.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Your code above does not work for AXF files. You need to modify it and use DataSource object, then call Openlayer method to get the Recordset.&amp;nbsp; As of now, your code above only works with shapefiles.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you can provide me a few records from ACPA_parcels and export those features out to a shapefile, I can help you with the coding tomorrow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I need a parcel feature that has the same projection with your point file.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 19:35:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214378#M1567</guid>
      <dc:creator>ThaiTruong</dc:creator>
      <dc:date>2012-08-29T19:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214379#M1568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Your code above does not work for AXF files. You need to modify it and use DataSource object, then call Openlayer method to get the Recordset.&amp;nbsp; As of now, your code above only works with shapefiles.&lt;BR /&gt;&lt;BR /&gt;If you can provide me a few records from ACPA_parcels and export those features out to a shapefile, I can help you with the coding tomorrow.&lt;BR /&gt;I need a parcel feature that has the same projection with your point file.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Attached is a subset of parcels. Thanks so much for taking the time.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll be in the office early tomorrow.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 19:53:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214379#M1568</guid>
      <dc:creator>BretWhiteley1</dc:creator>
      <dc:date>2012-08-29T19:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214380#M1569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Attached is a subset of parcels. Thanks so much for taking the time.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;I'll be in the office early tomorrow.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Because you have a large parcels dataset, using IsPointIn() will slow down your data capture process.&amp;nbsp; it has to loop through all the records inside your pacel layer to find one that contains the point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So, in your case, I would use FindNearestXY() to find a parcel intersected with the collected point.&amp;nbsp; This will perform much better on a large datasets like your.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, here is a new "InitilizeForm" sub for you.&amp;nbsp; Let me know if it works for you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Sub InitilizeForm&amp;nbsp; Dim objLayer&amp;nbsp; 'Get a reference to the first layer&amp;nbsp; Set objLayer = Application.Map.Layers("Violations")&amp;nbsp;&amp;nbsp; Dim objEditForm&amp;nbsp; Set objEditForm = objLayer.forms("EDITFORM")&amp;nbsp;&amp;nbsp; Dim pControls&amp;nbsp; Set pControls = ThisEvent.Object.Pages("PAGE1").Controls&amp;nbsp;&amp;nbsp; Dim dblX, dblY&amp;nbsp; dblX = Map.PointerX &amp;nbsp;&amp;nbsp; dblY = Map.PointerY&amp;nbsp;&amp;nbsp; 'Call when adding a new feature&amp;nbsp; If objEditForm.Mode = 3 Then &amp;nbsp; pControls("txtAddress").value = "" &amp;nbsp; pControls("txtPIN").value = ""&amp;nbsp; &amp;nbsp; 'Find Address &amp;amp; PIN # from Parcels Layer &amp;nbsp; Dim objParcels &amp;nbsp; Set objParcels = Application.Map.Layers("Parcels") &amp;nbsp; Dim rsGrid &amp;nbsp; Set rsGrid = objParcels.Records&amp;nbsp; &amp;nbsp; Dim Rec &amp;nbsp; Rec = rsGrid.FindNearestXY(dblX,dblY,0,map.Extent) &amp;nbsp; If Rec &amp;gt; 0 Then &amp;nbsp;&amp;nbsp; rsGrid.MoveFirst &amp;nbsp;&amp;nbsp; rsGrid.move(Rec -1) &amp;nbsp;&amp;nbsp; pControls("txtAddress").value = rsGrid.Fields("ADDR1").Value &amp;nbsp;&amp;nbsp; pControls("txtPIN").value = rsGrid.Fields("PIN").Value &amp;nbsp; End If&amp;nbsp; End If&amp;nbsp;&amp;nbsp; Set objLayer = Nothing&amp;nbsp; Set objEditForm = Nothing&amp;nbsp; Set pControls = Nothing&amp;nbsp; Set dblX = Nothing&amp;nbsp; Set dblY = Nothing&amp;nbsp; Set objParcels = Nothing&amp;nbsp; Set rsGrid = Nothing&amp;nbsp; Set Rec = Nothing End Sub&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 12:34:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214380#M1569</guid>
      <dc:creator>ThaiTruong</dc:creator>
      <dc:date>2012-08-30T12:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214381#M1570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Because you have a large parcels dataset, using IsPointIn() will slow down your data capture process.&amp;nbsp; it has to loop through all the records inside your pacel layer to find one that contains the point.&lt;BR /&gt;So, in your case, I would use FindNearestXY() to find a parcel intersected with the collected point.&amp;nbsp; This will perform much better on a large datasets like your.&lt;BR /&gt;&lt;BR /&gt;So, here is a new "InitilizeForm" sub for you.&amp;nbsp; Let me know if it works for you.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Sub InitilizeForm
 Dim objLayer
 'Get a reference to the first layer
 Set objLayer = Application.Map.Layers("Violations")

 Dim objEditForm
 Set objEditForm = objLayer.forms("EDITFORM")

 Dim pControls
 Set pControls = ThisEvent.Object.Pages("PAGE1").Controls

 Dim dblX, dblY
 dblX = Map.PointerX
&amp;nbsp;&amp;nbsp; dblY = Map.PointerY

 'Call when adding a new feature
 If objEditForm.Mode = 3 Then
&amp;nbsp; pControls("txtAddress").value = ""
&amp;nbsp; pControls("txtPIN").value = ""

&amp;nbsp; 'Find Address &amp;amp; PIN # from Parcels Layer
&amp;nbsp; Dim objParcels
&amp;nbsp; Set objParcels = Application.Map.Layers("Parcels")
&amp;nbsp; Dim rsGrid
&amp;nbsp; Set rsGrid = objParcels.Records

&amp;nbsp; Dim Rec
&amp;nbsp; Rec = rsGrid.FindNearestXY(dblX,dblY,0,map.Extent)
&amp;nbsp; If Rec &amp;gt; 0 Then
&amp;nbsp;&amp;nbsp; rsGrid.MoveFirst
&amp;nbsp;&amp;nbsp; rsGrid.move(Rec -1)
&amp;nbsp;&amp;nbsp; pControls("txtAddress").value = rsGrid.Fields("ADDR1").Value
&amp;nbsp;&amp;nbsp; pControls("txtPIN").value = rsGrid.Fields("PIN").Value
&amp;nbsp; End If
 End If

 Set objLayer = Nothing
 Set objEditForm = Nothing
 Set pControls = Nothing
 Set dblX = Nothing
 Set dblY = Nothing
 Set objParcels = Nothing
 Set rsGrid = Nothing
 Set Rec = Nothing
End Sub
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Brilliant! It works flawlessly.&amp;nbsp; Thank you so very much for your dedication to this community.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:31:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214381#M1570</guid>
      <dc:creator>BretWhiteley1</dc:creator>
      <dc:date>2021-12-11T10:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Filling in atrributes for a point layer from a underlying polygon layer</title>
      <link>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214382#M1571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Brilliant! It works flawlessly.&amp;nbsp; Thank you so very much for your dedication to this community.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm glad that it works for you, and hope that you don't find my house to be in violation of irrigation codes! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW, here's an example on how IsPointIn() works:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Sub InitilizeForm
 Dim objLayer
 'Get a reference to the first layer
 Set objLayer = Application.Map.Layers("Violations")

 Dim objEditForm
 Set objEditForm = objLayer.forms("EDITFORM")

 Dim pControls
 Set pControls = ThisEvent.Object.Pages("PAGE1").Controls

 Dim pPt
 Set pPt = Application.CreateAppObject("Point")

 pPt.X = Map.PointerX
 pPt.Y = Map.PointerY

 'Call when adding a new feature
 If objEditForm.Mode = 3 Then
&amp;nbsp; pControls("txtAddress").value = ""
&amp;nbsp; pControls("txtPIN").value = ""

&amp;nbsp; 'Find Address &amp;amp; PIN # from Parcels Layer
&amp;nbsp; Dim objParcels
&amp;nbsp; Set objParcels = Application.Map.Layers("Parcels")
&amp;nbsp; Dim rsGrid
&amp;nbsp; Set rsGrid = objParcels.Records

&amp;nbsp; rsGrid.movefirst
&amp;nbsp; Do While Not rsGrid.eof
&amp;nbsp;&amp;nbsp; If rsGrid.Fields.Shape.Ispointin(pPt) Then
&amp;nbsp;&amp;nbsp;&amp;nbsp; pControls("txtAddress").value = rsGrid.Fields("ADDR1").Value
&amp;nbsp;&amp;nbsp;&amp;nbsp; pControls("txtPIN").value = rsGrid.Fields("PIN").Value
&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Do
&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp; rsGrid.Movenext
&amp;nbsp; Loop

 End If

 Set objLayer = Nothing
 Set objEditForm = Nothing
 Set pControls = Nothing
 Set pPt = Nothing
 Set objParcels = Nothing
 Set rsGrid = Nothing
End Sub
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:31:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/filling-in-atrributes-for-a-point-layer-from-a/m-p/214382#M1571</guid>
      <dc:creator>ThaiTruong</dc:creator>
      <dc:date>2021-12-11T10:31:04Z</dc:date>
    </item>
  </channel>
</rss>

