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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving down in a grid 2

Status
Not open for further replies.

AndrewMozley

Programmer
Oct 15, 2005
621
GB
I realise that I have been inconsistent in handling movement in a grid.

A grid grdMain has RecordSource = “cData” and 5 columns.

When the user is positioned in any cell and presses <Enter>, focus is moved to the next cell in the right. It is intended that moving from a cell in the right-hand column should normally move to the first cell in the next row.

What is the easiest way for focus to move to the next line down (in the first column)? and where should the code be placed.

( The user usually navigates by pressing <Enter> But he may press the Down-Arrow key, in which case focus should move to the next cell down in the same column).

Thanks. Andrew
 
Thank you very much Olaf.

Exactly the right solution; works simply and perfectly. Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top