<?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: Need help with a search tool in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-search-tool/m-p/200687#M11532</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From &lt;A href="https://msdn.microsoft.com/en-us/library/aa264506%28v=vs.60%29.aspx"&gt;MSDN&lt;/A&gt;:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px;"&gt;There are two steps to creating an &lt;/SPAN&gt;&lt;SPAN class="unresolvedLink" style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px;"&gt;object variable&lt;/SPAN&gt;&lt;SPAN style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px;"&gt;. First you must declare the object variable. Then you must assign a valid reference to the object variable using the &lt;/SPAN&gt;&lt;STRONG style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px;"&gt;Set &lt;/STRONG&gt;&lt;SPAN style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px;"&gt;statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The only two object variables in the line that you highlighted as the error are &lt;EM&gt;pfeatureselection&lt;/EM&gt; and &lt;EM&gt;pqueryfilter&lt;/EM&gt; so one of these has not been set. Have a look at the code before this line to make sure that both of these variables have been assigned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I would strongly suggest migrating this tool to something other than VBA for the reasons that Curtis has already mentioned.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 May 2015 22:32:03 GMT</pubDate>
    <dc:creator>OwenEarley</dc:creator>
    <dc:date>2015-05-14T22:32:03Z</dc:date>
    <item>
      <title>Need help with a search tool</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-search-tool/m-p/200681#M11526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;OK all, I need a little help. Not sure how simple or how complicated this is. For starters I am a recent GIS graduate but not very proficient with model builder/python/vbscript (yet). I inherited a tool that was written in vbscript. Basically it&amp;nbsp; searches a table, finds the matching information and zooms to the item being searched for. however, as of late, I keep getting a runtime error 91.&lt;/P&gt;&lt;P&gt;This is the code where the error is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; pActiveview.PartialRefresh esriViewGeoSelection, Nothing, Nothing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #e23d39; text-decoration: underline;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;pfeatureselection.SelectFeatures pqueryfilter, esriSelectionResultNew, False&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; pActiveview.PartialRefresh esriViewGeoSelection, Nothing, Nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No idea what this means. I was hoping for one of two things here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1) someone can tell me how to fix this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2) there is a way to create simpler tool using model-builder&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help received!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 16:26:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-search-tool/m-p/200681#M11526</guid>
      <dc:creator>JoeLivoti_II</dc:creator>
      <dc:date>2015-05-14T16:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a search tool</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-search-tool/m-p/200682#M11527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the information so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To answer both of your questions, we would probably need more information, namely the code the tool is using.&amp;nbsp; Also if you could give us the full wording of the error code you are getting, that can help define what is causing the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migration-blogpost/1070"&gt;Posting Code blocks in the new GeoNet&lt;/A&gt;​ if you need help with posting code to Geonet follow that link, and posting code blocks is generally preferred to uploading a script(unless it is ridiculously long, which it shouldn't from the sound of the tool).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 16:33:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-search-tool/m-p/200682#M11527</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2015-05-14T16:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a search tool</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-search-tool/m-p/200683#M11528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;[is there] a way to create simpler tool using model-builder&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The way this is done now is in python using the &lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/introduction-to-arcpy-mapping.htm"&gt;arcpy.mapping &lt;/A&gt;module. You can either write a Python script and paste it into the Python window, or write a little Python function in ModelBuilder inside the Calculate Value tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VBA (I'm assuming this is a VBA script) is deprecated in ArcGIS 10.1 (you need a special install for it to even run). Python scripts or .NET ArcObjects is the current way to accomplish this kind of thing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 16:45:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-search-tool/m-p/200683#M11528</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-05-14T16:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a search tool</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-search-tool/m-p/200684#M11529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I may add that this functionality is pretty easy out of the box in 10.x: Select Features By Attribute, right click the layer, Selection, Zoom To Selected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 16:48:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-search-tool/m-p/200684#M11529</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-05-14T16:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a search tool</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-search-tool/m-p/200685#M11530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A few things:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - It is VBA Script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - see image below for the error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - I know how to use the select by attributes, but the way this was setup was much easier without having to repopulate the attribute field. This tool searches all the parcels of a county (60,000+) with a menu (see below image)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error.jpg" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/99925_error.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 17:44:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-search-tool/m-p/200685#M11530</guid>
      <dc:creator>JoeLivoti_II</dc:creator>
      <dc:date>2015-05-14T17:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a search tool</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-search-tool/m-p/200686#M11531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did not realize they don't have a syntax formatting for VB.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 22:01:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-search-tool/m-p/200686#M11531</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2015-05-14T22:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a search tool</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-search-tool/m-p/200687#M11532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From &lt;A href="https://msdn.microsoft.com/en-us/library/aa264506%28v=vs.60%29.aspx"&gt;MSDN&lt;/A&gt;:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px;"&gt;There are two steps to creating an &lt;/SPAN&gt;&lt;SPAN class="unresolvedLink" style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px;"&gt;object variable&lt;/SPAN&gt;&lt;SPAN style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px;"&gt;. First you must declare the object variable. Then you must assign a valid reference to the object variable using the &lt;/SPAN&gt;&lt;STRONG style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px;"&gt;Set &lt;/STRONG&gt;&lt;SPAN style="color: #2a2a2a; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px;"&gt;statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The only two object variables in the line that you highlighted as the error are &lt;EM&gt;pfeatureselection&lt;/EM&gt; and &lt;EM&gt;pqueryfilter&lt;/EM&gt; so one of these has not been set. Have a look at the code before this line to make sure that both of these variables have been assigned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I would strongly suggest migrating this tool to something other than VBA for the reasons that Curtis has already mentioned.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 22:32:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-search-tool/m-p/200687#M11532</guid>
      <dc:creator>OwenEarley</dc:creator>
      <dc:date>2015-05-14T22:32:03Z</dc:date>
    </item>
  </channel>
</rss>

