PMFJI Terry,
The form is not modal, hence code continues to run after "do form..." and visible = .t. ( or .Show()) is executed.
Simple solution is to make it modal. Alternatively you could hide() caller form but pass form's reference to called form and it calls this.oCaller.Show() in its unload. Something like:
thisform.Hide()
do form serForm with this, otherParms
* Called form init
lparameters toCaller, ...
this.Addproperty('oCaller',toCaller)
*....
* Called form unload (or release)
loCaller = this.oCaller
this.oCaller = .null.
loCaller.Show()
Yet another alternative is not to call another form. Instead import results are shown in a container temporarily added to 'caller' directly. ie:
thisform.NewObject("ImportResults",...) && Container class resize itself to cover other objects
thisform.ImportResults.Visible = .t. && Its 'Exit' button calls parent.parent.removeobject(this.parent.name)
Cetin
>Hi Borislav
>
>Thanks
>
>No, that didn't make a blind bit of difference. The calling form still stayed on top and showing strangely enough. However, I sussed the problem. The error display form should have been modal, as I want the user to peruse it and force him to close it before going on. I must have temp. taken modal off, for testing, e.g. so I could browse the table, and forgotten to reinstate it.
>
>Now there is no need even to disappear the calling form - it stays in the background till the error form closes.
>
>Still I'm not sure of the reason why the calling form doesn't obey unless the error form is modal.
>
>Cheers
>
>Terry
>
>>Terry try this:
>>
>> If .lDiscrepancies
>> Select serCIFErr
>> Use
>> thisform.Hide()
>>
>> Do Form serImportCIFErrors
>>
>> thisform.Show()
>> Endif
>>