Another approach might be to always edit (rather than add a new row) and use
saverow on every field so that the form always displays what the user had
altered and that is what is stored. Then it is up to the user to correct
anything that is wrong <g>.

Obviously this is not always possible but it might give you another idea,
Good luck,
Regards,
Alastair.

----- Original Message -----
From: "tellef" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 27, 2002 3:47 PM
Subject: Re: Disable [Esc] on Forms


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

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