Rob, what everyone said is right, especially Bernie and Sami.  I'd add a
suggestion, though.  I'd trap for '[ESC]' in an EEP that executes at

    After Leaving Row

or

    After Leaving Section

These are located in Form Designer under "Table Settings".  Now,
unfortunately, I don't have the code, not even a snippet, to offer f/this
case.  However, if it were the case that only one field on the form is
editable, such code could (and probably should) be located at "Field Exit"
(Form Designer).  If this is the case, lemme' know, as I have code f/this.
Or, and it's probably a bit of work, but you could use the same block of
code that traps f/the '[ESC]' in each editable field on the form.  You could
create something like "NoEscape.CMD" and either call it directly on Field
Exit or w/in an EEP you've already assigned to Field Exit.

Say, the code should be pretty much similar, so ...


SET VAR vLastKey = (LASTKEY(0))
SWITCH (.vLastKey)
CASE "[ENTER]"
   RUN DE_RESPONSE_VALID.CMD    -- Is this response valid?
BREAK
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

                                -- ****************************************
BREAK
DEFAULT
BREAK
ENDSW
...
RETURN


Now, I've not addressed SAVEROW, NEXTROW, PREVROW or why these might be
useful - that's mostly due to my understanding the issues but not really
knowing how to address them fully by way of these commands.  F/now, I'll
gladly let others advise you here.

HTH,
Steve in Memphis




----- Original Message -----
From: Rob Vincent
To: [EMAIL PROTECTED]
Sent: Wednesday, September 04, 2002 6:55 PM
Subject: Disable [Esc] on Forms


Greetings Guru's

In order to correctly process a form, I need to force the user to click a
button and confirm
that they are [Done] or that they want to [Cancel].

When clicked, each button has a very specific .eep that runs to perform
various calculations.

I'm finding that the form can be exited by pressing the [Esc] key which
by-passes the routines
I've written and popups the generic dialog for Save, Discard or Cancel
giving the user a false
impresion that things are as they should be (Not!).

Any way to disable the [Esc] from exiting a form?
I've toyed around with SET KEYMAP, but [Esc] doesn't appear to be a valid
key.

Are there any inherent problems with attempting this, or is there a better
to go about it?

As always, I appreciate everyone's input.

- Rob Vincent
Dearborn Heights, Michigan

================================================
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/

Reply via email to