<?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: Query Attribute Table with VBA in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/query-attribute-table-with-vba/m-p/685233#M18415</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One problem is that you're using a variable as a literal. You need to concatenate the literal parts of the string with the variable like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pQueryFilter.whereClause = "ADDRESS = '" &amp;amp; DEMname &amp;amp; "'"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jun 2010 22:35:46 GMT</pubDate>
    <dc:creator>JamesMacKay</dc:creator>
    <dc:date>2010-06-08T22:35:46Z</dc:date>
    <item>
      <title>Query Attribute Table with VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/query-attribute-table-with-vba/m-p/685232#M18414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm creating a form that will automatically update the zoning layer. I need help with the first part.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I need the user to input the Address into a text box then search the feature class for that address.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With that address I need to populate some labels with information in the same table as the address, like zoning.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've searched for hours and couldn't really come up with anything worht while I don't think&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Private Sub cmdsearch_Click()
&amp;nbsp; Dim pMxDoc As IMxDocument
&amp;nbsp; Dim pMap As IMap
&amp;nbsp; Dim pActiveView As IActiveView
&amp;nbsp; Dim pFeatureLayer As IFeatureLayer
&amp;nbsp; Dim pFeatureSelection As IFeatureSelection
&amp;nbsp; Dim pQueryFilter As IQueryFilter
&amp;nbsp; 
&amp;nbsp; Set pMxDoc = Application.Document
&amp;nbsp; Set pMap = pMxDoc.FocusMap
&amp;nbsp; Set pActiveView = pMap
&amp;nbsp; 
&amp;nbsp; 
&amp;nbsp; If Not TypeOf pMap.Layer(0) Is IFeatureLayer Then Exit Sub
&amp;nbsp; Set pFeatureLayer = pMap.Layer(0)
&amp;nbsp; Set pFeatureSelection = pFeatureLayer 'QI
&amp;nbsp; 
&amp;nbsp; Dim DEMname
&amp;nbsp; DEMname = Me.TxtAddress.Text
&amp;nbsp; 
&amp;nbsp; Set pQueryFilter = New queryFilter
&amp;nbsp; pQueryFilter.whereClause = "ADDRESS = 'DEMname'"
&amp;nbsp; 

&amp;nbsp; pActiveView.PartialRefresh esriViewGeoSelection, Nothing, Nothing
&amp;nbsp; pFeatureSelection.SelectFeatures pQueryFilter, esriSelectionResultNew, False
&amp;nbsp; pActiveView.PartialRefresh esriViewGeoSelection, Nothing, Nothing
&amp;nbsp; 
End Sub
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jun 2010 19:07:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/query-attribute-table-with-vba/m-p/685232#M18414</guid>
      <dc:creator>TrevorRobertson</dc:creator>
      <dc:date>2010-06-08T19:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Query Attribute Table with VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/query-attribute-table-with-vba/m-p/685233#M18415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One problem is that you're using a variable as a literal. You need to concatenate the literal parts of the string with the variable like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pQueryFilter.whereClause = "ADDRESS = '" &amp;amp; DEMname &amp;amp; "'"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jun 2010 22:35:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/query-attribute-table-with-vba/m-p/685233#M18415</guid>
      <dc:creator>JamesMacKay</dc:creator>
      <dc:date>2010-06-08T22:35:46Z</dc:date>
    </item>
  </channel>
</rss>

