Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default focus to the last record added in grid 2

Status
Not open for further replies.

Avacha

Technical User
Apr 1, 2002
69
US
In a MSHFlexGrid,
how do we make the focus default to the last record added ?
Please help .
Thanks a lot.


 
Basically you need to know which row it is and then set the
Code:
.Row
property accordingly.

Code:
MSFlexGrid1.Row = 4

If the fourth row received the lase record. You need to factor in any fixed rows, as they will not contain a record, as well. Remember that the grid rows start at zero (0). If you add one row for eacg record then you can use the last row like this,

Code:
MSFlexGrid1.Row = MSFlexGrid1.Rows - 1

Take Care,

zemp

"If the grass looks greener... it's probably because there is more manure."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top