Polychronis
You are correct to use an "after leaving section" level eep. If errors are
found, your EEP will have to trap the last key pressed by the user and "play
back" a keystroke to return them to the first table in the event of an
error. The possibiltiies are:
[Enter] or [Shift][F8] or mouse click to go to the next table
[Esc] or [Alt] to go to the menu.
I'd suggest doing this:
1. Record a playback file called PrevTab.PLY which plays the [Shift][F7]
key
2. Record a playback file called ESC.PLY which plays back the Esc key.
2. Write your code as follows:
SET VAR vLastKey = (lastkey(0)) -- capture last key hit
IF (conditions indicating a problem in table 1) THEN
PAUSE 2 USING 'Errors to correct in first table! Click OK to fix them!'
IF vLastkey IN ('[Esc]','[Ctrl][F12]') THEN
-- R:Base records the Alt key as Ctrl F12
PLAYBACK ESC.PLY
ELSE
PLAYBACK PrevTab.PLY
ENDIF
ENDIF
David Blocker
David Blocker
[EMAIL PROTECTED]
781-784-1919
Fax: 781-784-1860
Cell: 339-206-0261
----- Original Message -----
From: "ELOEN" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, October 31, 2003 3:14 AM
Subject: [RBASE-L] - Checking 1st table in a 2 tables form
> Rbwin 1.866
> This must be trivial for you, but I stuck.
>
> I have a 'classic' two tables edit form, with a relation 1 to many. The
> second has a tiered region and what I want is this:
>
> Without leaving the form, before the user 'land' on the second table, to
> make some checking to the 1st table. In case of an error, a message to
> appear and 'land' the user to the appropriate field.
>
> My tries have focused on a EEP after leaving the section of 1st table,
but:
>
> If the user click on a field of the second table, I have no way to bring
him
> back to 1st table in case of an error. Have you?
>
> My last thought was to use 2 forms instead of 1, but I wanted to ask
before
> trying this path.
>
> Hoping for an answer.
>
> Polychronis Kontos
> Athens, Greece
>
>