>I'm using an incremental search combobox that seeks to the current closest match as you type. It also has a grid on the same form that goes to the corresponding record in the grid as the user types, and highlights that record so the user can look at the grid to see if it is the record they are looking for. Like, real time search. But, I lose the highlight because after each keystroke in the combo I have to set the focus to the grid then back to the combo for the next keypress. Then I lose the highlight in the grid. Anyway to keep the DynamicBackColor after grid loses focus?
>
>Eric K.
With a proper dynamicbackcolor setting all you need is to refresh the grid. ie: This is from "highlighted" grid class in files\classes section :
WITH this
IF !empty(.RecordSource)
.nCurRec = recno(this.RecordSource)
.SetAll("DynamicBackColor", "IIF(RecNo(This.RecordSource) = This.nCurRec," + ;
str(this.cCurRecBackColor)+","+str(this.BackColor)+")", "Column")
.SetAll("DynamicForeColor", "IIF(RecNo(This.RecordSource) = This.nCurRec," + ;
str(this.cCurRecForeColor)+","+str(this.ForeColor)+")", "Column")
ENDIF
ENDWITH
This.nCurRec = recno()
This.refresh
From outside of grid as pointer moves you just call grid.recchange().
Cetin