Hi,I recently developed a little application for our department that allows them to type in textboxes which then goes to the attribute table and selects.here's a quick sample (bear with me, I picked apart the code and omitted a bunch of unnecessary lines): ' Create the query filter using user input.
Dim pQueryFilter As IQueryFilter
Dim pFeatureSelection As IFeatureSelection
pQueryFilter = New QueryFilter
pQueryFilter.WhereClause = "SEC = '" & sSEC & "'" & " AND TWP = '" & sTWP & "'" & " AND RGE = '" & sRGE & "'" & " AND MER = '" & sMER & "'"
pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, Nothing, Nothing)
' Perform the selection using the user input.
pFeatureSelection.SelectFeatures(pQueryFilter, esriSelectionResultEnum.esriSelectionResultNew, False)
This will obviously be needing modification to suit your code/attributes. The only thing I left out, is that you need to set the pFeatureSelection to the feature layer you're selecting attributes from (pFeatureSelection = pFeatureLayer).Mine basically says where field "SEC" is equal to the string "sSec" which I get from Me.txtbox_Sec.Text, and so on.I hope this gives you at least a little help. It's a very simple query, but works for me.