
Incremental search in DBGrid & End printing
Quote:
>1.I need to give the user the capability to enter data in a text box an as
>he does so each key stroke narrows the search on a DBGrid showing info in
>the first column and the highlight moves to the appropriate row as the
>search narrows( which is the index of the underlying data table.)
>I've see lots on these searches for lists and combo boxes but nothing on
>DBGrids
I just worked throught this myself.
In the On_Change event code of the text box, use a seek on the
recordset behind the DBGrid. The recordset has to be of the Table
type.
Data1.Recordset.Index = "Main"
Data1.Recordset.MoveFirst
Data1.Recordset.Seek ">=", PosToPart
PosToPart is the Text Box, Data1 is the Data Control.
Hope this helps.
Shawn