>Try this
>enter using formname >set var lkey = (lastkey(0)) >if lkey = '[Esc]' then > do whatever >endif >return Rob: I've struggled with the same thing. I do like what Bernie suggests above, where if they don't press a button you send them back into the form until they hit one of the two buttons. What I do before I bring up the form is: SET VAR vOK TEXT = NULL Then the 'save' button sets vOK to 'yes', the 'cancel' button sets vOK to 'no'. Coming out of the form, I test is vOK is still null; if so I send them back into the form. But this only half works. If they press [ESC] and choose to SAVE, then you put them back into the form and they press a 'cancel' button it is meaningless because they've already saved the data. I like Sami's idea of coming out of the form and asking them if they meant to save or cancel, but again this only half works because they might have already chosen to 'save' when they hit the 'esc' and what prevents them now from saying they meant to 'cancel'? You can't undo their save! >CASE "[ESC]" > EXITFORM -- User wants to quit, so just let them ... > -- **************************************** > -- Rob, in your case, this is where > -- you'd want to return to the form and/or > -- whatever else you need it to do This code from Steve will not work. If you press an [esc] to leave a row, a section, whatever, you CANNOT 'return to the form'. And that's a big problem. An [esc] is an [esc] to a form; the eep cannot undo an escape and return you back into the form. The eep will continue to process (perhaps you could ASK in the eep if they mean to save/discard and either do a saverow or a resetrow), but it will still leave the form. Karen Karen ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l ================================================ TO SEARCH ARCHIVES: http://www.mail-archive.com/rbase-l%40sonetmail.com/
