I'm creating a form that will automatically update the zoning layer. I need help with the first part.I need the user to input the Address into a text box then search the feature class for that address.With that address I need to populate some labels with information in the same table as the address, like zoning.I've searched for hours and couldn't really come up with anything worht while I don't thinkPrivate Sub cmdsearch_Click()
Dim pMxDoc As IMxDocument
Dim pMap As IMap
Dim pActiveView As IActiveView
Dim pFeatureLayer As IFeatureLayer
Dim pFeatureSelection As IFeatureSelection
Dim pQueryFilter As IQueryFilter
Set pMxDoc = Application.Document
Set pMap = pMxDoc.FocusMap
Set pActiveView = pMap
If Not TypeOf pMap.Layer(0) Is IFeatureLayer Then Exit Sub
Set pFeatureLayer = pMap.Layer(0)
Set pFeatureSelection = pFeatureLayer 'QI
Dim DEMname
DEMname = Me.TxtAddress.Text
Set pQueryFilter = New queryFilter
pQueryFilter.whereClause = "ADDRESS = 'DEMname'"
pActiveView.PartialRefresh esriViewGeoSelection, Nothing, Nothing
pFeatureSelection.SelectFeatures pQueryFilter, esriSelectionResultNew, False
pActiveView.PartialRefresh esriViewGeoSelection, Nothing, Nothing
End Sub