All,
private vars are an exceptionally bad idea - for much of the same reasons that publics are - plus - if decoupling is a goal - there is nothing that breaks it worse than sharing live variables.
I would suggest forgetting that the PRIVATE declaration even exists. I have all but fired programmers when I see a PRIVATE in their code...
Ken
>Randy:
>
>Declare a variable PRIVATE in the calling program. In the UNLOAD method of the form, set the variable to some value. The value will be available when you return to the calling program. Note that this only works with modal forms.
>
>PRIVATE lRetval
>lRetval = .F.
>loForm = createobject('myform')
>loForm.show()
>
>if lRetval = .T.
> *-some action
>else
> *- some action
>endif
Ken B. Matson
GCom2 Solutions