Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid question...
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00055624
Message ID:
00055625
Views:
27
>I am developing a form with a grid control as the only object. This grid is to be used for fast data entry of four fields of information. I want the cursor in the grid to move to the first column of the next row whenever the Tab or Enter key is pressed in the last column of the grid. If the record pointer is on the last record of the corresponding table, then a new blank record should be appended. Can Anyone Help?
>Signed Gridless in Lincoln.

Jerry.
I did just what you're asking few days ago. What you do is put some code in the BeforeRowColChange event of the grid. Something like:

LPARAMETERS nColIndex
LOCAL nCurrRec
IF nColIndex = 4
IF LASTKEY()=13 OR LASTKEY()=9
IF RECNO() = RECCOUNT()
APPEND BLANK
ELSE
KEYBOARD '{ENTER+DNARROW}' &&goto 1 col and down 1 row
ENDIF
ENDIF

I'm sure you could be more creative than what's above but it should give you plenty of ideas to start using.

HTH
John.
It's "my" world. You're just living in it.
Previous
Reply
Map
View

Click here to load this message in the networking platform