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

Exiting Browse Window 1

Status
Not open for further replies.

Bebot

MIS
Oct 31, 2006
6
DE
Dear Experts,

Seems like the only way to exit a BROWSE window using the keyboard is to press [ESC]. So I decided to put in this code before the BROWSE is called so that user can simply press the [Enter] key to exit BROWSE.


ON KEY LABEL ENTER KEYBOARD '{ESC}'



It worked quite well until I compiled the program. The program halts with a non-descript error message (Cancel or Ignore). How to handle this in an EXE file?

I don't want to use the Grid object in this particular situation because it is a general purpose form called by different programs so the ALIAS is created on the fly and I have to pre-define the KEYPRESS method on each object in the grid. Appreciate any advice on this matter.

Thank you.
 
But watch out, your user may just press the escape key anyway, so you need to allow for that happening!

B-(

Regards

Griff
Keep [Smile]ing
 
Mike, you're great, it worked. How could it have [ESCAPED] me that the [ESC] key was interrupting the program. It might be a no-brainer for you but this tip just saved me from reworking this whole one-line code to go for the GRID instead. You deserve one.
 
I will also just add for the 2cents

in a brows window if one where to change the value of a field and NOT change focus to another field/record the escape key will abandon the data and revert to the original data where the Ctrl-W is an actual save key combination.

another reason to avoid the escape key.

Steve Bowman
Independent Technology, Inc.
CA, USA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top