Save the value to a form property, then query it before destroying the form object.
RetVal = oForm.MyCustomProperty
oForm = null
>When I want to return a value from one form use the following Syntax:
>
>
>DO Form WITH MyPar TO MyVar
>
>
>With the following code in the UnLoad event of the Form:
>
>
>Return MyValue
>
>
>
>How to return the value from an object form, that it was created with CreateObject?
>
>
>oForm = CreateObjec('MyClassForm')
>oForm.Show(1)
>
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer