>I'm using Ingrid 1.5 to locate specific records in a table. Once the user has located the correct record and positioned the cursor anywhere on that row, I would like to be able to press ENTER to exit the grid and have a series of actions performed.
>I've tried trapping chr(13) in the keypress method without success.
>
>Any help would be appreciated.
>
>Alex Shoob
Are you trying to trap the ENTER in the InGrid control, or the form?
The InGrid control traps the ENTER key itself if it is in the process of a search to signal the end of the search and the restoration of the column caption.
If the entire functionality of the form is the grid to search, I would set the form's KeyPreview to .T. and trap for the ENTER keypress in the form's KeyPress event; otherwise, you may need to trap for ENTER in the keypress for each control in the grid (The ingrid controls and any other controls). For the Ingrid control make sure to call the default class behavior.
---Scott.
R. Scott Mackay
Classy Components Inc.