How to get the ???queried??? value from attribute table and put it in a textbox?

437
1
02-07-2012 06:55 AM
EmmaOlsson
New Contributor
I am new in VBA, I have a problem about querying an attribute table....:

I have a table of a layer (wish.shp) with the fields: owner_ID, Value, Area.

I made 3 textboxes in a userform, I input the owner_ID, in one textbox, I want to get the corresponding value and area and display in other textboxes.

does anybody know how to do it ?
0 Kudos
1 Reply
JohnHauck
Occasional Contributor II
You could use ITable::Search or IFeatureClass::Search with a QueryFilter that has a defined where clause with the value you have entered for owner_ID; for example ("owner_ID = " & textBoxValue). Once the cursor is created you could loop through the returned rows and provide the returned value(s) to your UI.

How to perform an attribute query

Querying geodatabase tables
0 Kudos