Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form release does not work
Message
From
17/07/2007 13:51:50
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
 
To
17/07/2007 06:37:22
Albert Beermann
Piepenbrock Service Gmbh & Cokg
Osnabrück, Germany
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
MySQL
Miscellaneous
Thread ID:
01240955
Message ID:
01241210
Views:
33
>Hello Everybody
>
>This one makes me crazy !
>
>I have a select form with some search fields and a result grid.
>With doubleclick on a grid record i start a modal editform for the selected record.
>With click on a "NEW" command button i start the modal editform with empty fields
>
>The editform has some header informations and a pageframe with more details.
>When an existing record was selected the header informations and the pageframe is filled with data.
>When the form is called in "NEW" mode, only the header information fields are shown.
>The user has to fill the fields with correct data, save the header record, and then the empty pageframe is shown
>to enter detail informations for the header.
>
>Here is my problem:
>The edit form has an exit button (blah,blah + thisform.release)
>When working on an existing record, everything is OK!
>When working in "NEW" mode, the exit button does not work !!
>The user starts with "NEW" button from the search form,the edit form is shown(only the header part)and upps the user does'nt want to create a new record.
>He clicks on the exit button with no reaction.
>No errors, but the form is not released ???????
>
>When the user enter some header information and save the header record the exit button works!
>They can leave the form without entering som detail information in the pageframe!!??
>
>Only when they want to leave the form without typing anything the exit button does not work !!????
>
>I tried nearly everything. Activate or deaktive the pageframe! Set focus to ... Not valids on the header fields...
>Show the empty pageframe together with the empty header immediately after init ...
>Debugging ...
>No errors,no unexpected programm steps and no release of the form ??????????
>The users have to kill the application with the task manager.

Are you using a framework? If so, creation of a new record might start some sort of database operation like buffering or a transaction, or create a new object whose reference you might need to release before you can release the form containing it.

If you are using a framework, it will usually have some sort of .Cancel() method to back you out of the creation of a new record, or even editing of an existing record. You may need to call this .Cancel() method before trying to .Release().

If you're working with both parent and child records you may need to .Cancel() both in a specific order e.g.
This.Cancel()
This.Parent.Cancel()
This.Release() && or ThisForm.Release()
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform