I think the key difference here is in the method.

Which is easier?  

1. Call first form. Call second form from within firstform.  On exit from 
second form, somehow make first form (still running) update to show changes 
made by second form. 

2. Call first form. Exit first form and call second form. Exit second form and 
call first form. Data will be displayed correctly.

Perhaps this will shed some light.

Dennis


________________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Monday, November 30, 2009 1:54 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: saving data in form to table

I'm not sure I can explain it any differently.  Dennis's code is similar to 
mine -- same end,
different means.  My understanding is that (1) you have a program that brings 
up Form1, 
(2) on that form you have a button that brings up Form2, (3) after you exit 
Form2 you want
data on Form1 to be updated.  So we have to close down Form1 and reopen it.  So 
here's
my original post with a few more comments in underlines.

Your main program (you need a flag to tell you whether to come back to the 
first form)
If you never brought up the SecondForm, then vFromSecond will be null and 
you'll just
continue on with your program

LABEL formagain

SET VAR vFromSecond TEXT = NULL
EDIT USING FirstForm

IF vFromSecond = 'yes' THEN
   GOTO formagain
ENDIF

-- continue with other program code here


On Firstform, you have a button that calls up the second form, and you have code
for that eep.  That code will call the SecondForm, and after the SecondForm is
exited, it will set vFromSecond = 'yes', close the FirstForm, and return you 
back
to the code I show above, where the value of vFromSecond is tested.

SAVEROW    -- this will save data on FirstForm
EDIT USING SecondForm
-- the following code happens after you have exited the second form and want to 
go back to the first form
SET VAR vFromSecond = 'yes'
CLOSEWINDOW -- this closes the first form
RETURN



Ok,

Sounds good.

Now how do you exit the form when you use the popup instead of the form being 
in the background.


Reply via email to