Re: Forms4.5: new_form causes ask-commit-question

From: Neville Sweet <sweet.neville.nj_at_bhp.com.au.no_junk_email>
Date: Thu, 11 Nov 1999 15:16:42 +1100
Message-ID: <80dg46$a1q8_at_atbhp.corpmel.bhp.com.au>


Ton,

Since the new_form is in your menu, add the Clear_Form to the menu's Command Text, prior to the New_Form.
This would, of course, apply to all programs that share the menu. Without thinking too much about it, you could do something like: IF Get_Application_Property(CURRENT_FORM_NAME) = 'yourform' THEN
  Clear_Form(----);
END IF;
New_Form('anotherform');

Rather than hard-code the form name in your menu, a more generic method would be to use a Global, which you could set in a When-New-Form-Instance and then test in your menu.

Ton Schalke wrote in message <3829AD71.470B39CF_at_worldonline.nl>...
>Thanks for the suggestions.
>I have forgotten to mention something important. The new_form command is
>not issued from the old form, but from a menu. I think the question 'Do
>you want to save the changes you have made?' is raised somewhere between
>the triggers post-block and post-form. But I can't find the trigger
>where I can put an clear_form or exit_form.
>Ton
>
>Steve Cosner wrote:
>>
>> Ton Schalke wrote:
>> > I have a form with outstanding changes, but I don't want to save them
or
>> > have forms asking me to save them. In the form I have made two
triggers:
>> > key-exit en when-window-closed. Both have the same code:
>> > exit_form(no_validate). Works fine. But if I start another form with
>> > new_form, then forms starts asking me 'Do you want to save the changes
>> > you have made?'. Does anybody know which trigger I can use to prevent
>> > this?
>>
>> Just before you issue the New_Form command, do this:
>>
>> CLEAR_FORM(NO_VALIDATE,FULL_ROLLBACK);
Received on Thu Nov 11 1999 - 05:16:42 CET

Original text of this message