>Hi,
>
>I have an intermittent problem during the following scenario.  Obviously
>there is a wrong approach of some sort in switching the forms as I am doing.
>Is there an idea why or better still - what is the best way to do this?
>(Perhaps Forms 101 question - but can't get more help from the Frm
>functions).
>
>I am in a Form - say (currentView) and I open a small form to take the user
>input using
>    FrmPopupForm(inputView);
>(I am using FrmPopupForm because the input form is small - kind of like Find
>input form),
>
>When the user taps on OK of this form - it should actually go to a new form.
>I have tried various ways but get errors in all approaches. Ideally I want
>to go to the new form (newView) - In order to clean up any processing with
>the currentView, I "return" to currentView and then follow it by a
>FrmGotoForm(newView) to switch to the new one.  This is given below: (Ignore
>the SysTaskWait for now)
>
>     FrmReturnToForm(currentView);
>             // Try adding a delay...
>             SysTaskWait(60); // wait a second?
>     FrmGotoForm(newView);
>
>I get *intermittently* an error which is connected with FrmReturnToForm
>while processing (internally) FrmEraseForm().  Typically this happens on the
>first usage - but not guaranteed.  Happens with the release version of the
>OS and not Debug.  I have tried to put delay to see if the opening of the
>new form has any impact on the processing related to the "return" to the old
>form.  But this does not help.
>
>What is the best way to do this?

One approach (if you are about to open a completely new form), is

FrmCloseAllForms();
FrmGotoForm(newForm);

All open forms will receive a frmCloseEvent, so you'll have a chance 
to do any saving or clean-up before the new form opens.

JB


----------------------------------------------------------------------
JB Parrett                         603-673-5046
True North, Inc.                   603-673-5035 FAX
9 Pulpit Run                       [EMAIL PROTECTED]
Amherst, NH 03031-1510             http://northisup.com

It is interesting to note that there are only two enterprises in the
world that refer to their patrons as 'users.' - Edward Tufte
----------------------------------------------------------------------

Reply via email to