I'm still having difficulty with this. The links provided are a very high-level overview, but I can't seem to find a way to get started.I have got my button click function this far: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim pMap As IMapDocument
Dim activeView As IActiveView
Dim featureLayer As IFeatureLayer
Dim whereClause As String
pMap = New MapDocument
activeView = pMap
featureLayer = pMap.Layer(0, 0)
whereClause = "PRECINCT = " + txtPrecinctSearch.Text
SelectMapFeaturesByAttributeQuery(activeView, featureLayer, whereClause)
End Sub
The variable txtPrecinctSearch.Text is coming from a user input textbox on the form. There are no errors shown in the code, but I get a fatal exception when I try to run this. I just don't understand what is causing the problem. It really is ridiculous that there is no clear documentation on how to set up the variables for the current map, active map frame, and the selected layer.