Hiya Steve ---
As Jim pointed out in his reply to this, ActiveRow can sometimes be worse than useless :-)
What I have found works (in a general sense) is that since the Grid is bound to a table, I reference the current record of the recordsource. So...if I want to start at a given line in a grid, I issue a GOTO or SEEK or whatever to take me to the record I want and then Grid.SetFocus()
>
>Just want to know why ActiveRow doesn't return proper row number ( always 0 ) if you put the codes outside of a grid?
>
>Example. Object: Command1 Procedure: Click
>
>ThisForm.Grid1.ActivateCell( 3,1 ) && Row = 3 & Column = 1
>ThisForm.Grid1.ActiveRow
>
>Row should return 3, but instead it return 0
>
>But if I put the same code in the Click event of the textbox of Grid1 column. It works fine because the row is highlighted and it has a focus..
>
>Setting the focus on the text of a grid column doesn't solve this problem if you have multiple rows . Is there are an alternative way?
>
>Any help is appreciated.
>
>Steve.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05