Andreas,
release method requires first object inited. If you handle errors in de, DE loads before init, and you might be ever blocking the init to run. After your error handling, set a flag and let init run so it can return an .f. Or as an alternative do error handling in code before calling the form (no data, DE wouldn't load because tables in use etc, shared use and private datasessions could prevent much of the errors though).
Cetin
>Cetin,
>
>this doesn't work because the form will not be released and remains in memory.
>
>Andreas
>
>
>>>Hi,
>>>
>>>I want to close a form programatically before the user can interact with the form e.g. the form contains no data or an error loading the data environment handled by the error method.
>>>
>>>Unfortunately calling the THISFORM.Release method doesn't help.
>>>Calling this method in the activate or init event/method is ignored by the system.
>>>
>>>Thanks for any help.
>>>
>>>Andreas
>>Andreas,
>>In init "return .f." so form cannot init.
>>Cetin