Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting records from a grid
Message
From
26/11/2004 09:10:01
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00964894
Message ID:
00964900
Views:
9
This message has been marked as the solution to the initial question of the thread.
>I have a form with a grid which displays a set of records from a cursor. When a user clicks on the record (row) I want to be able to press the enter key which will close down the form and locate the record so that it is displayed on my other form. I know how to loate the record to show its just that I do not know how to allow the user to press enter and to what event should be used.
>
>Any help would be greatly appreciated.

Neil

Seeing as you're using the mouse, how about, at the AfterRowColChange() event you shoot your cursor over to another object (say an Accept Button, or even an invisible control. This control waits for user input then immediately tests for CR, in its Keypress() event. If CR, do your thing, else shoot back to the grid, at the same column and continue as normal. The grid should look no different, still the same row selected, and the user none the wiser that this has happened - as soon as he clicks on the grid again IT gets the focus.

Huh?

Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Reply
Map
View

Click here to load this message in the networking platform