>>>
>>Run your form with:
>>Do YourForm to YourResult
>>where Your Result is a variable where you receive the result from YourForm
>>
>>In the Unload method issue only:
>>return nEmplID
>
>
>I made the above mentioned changes and elimiated all
>the syntax errors but the value of the selected record
>is not retuened from the form.
This might be because by the time the Unload method is called, the
nEmplID field has already 'expired' (ie, the data source has
already been unloaded).
>While searching for alternatives, i placed code in the dbl
>click event of the list box to store the ID to a newly created
>public variable and then release the form.
>
>THAT returns the correct value so I know the list box is
>functioning but creating public variables on the fly
>seems an incorrect way to go about sending values back and
>forth...
Don't use a public variable (non-OO, IMHO messy). Create a protected property for your form. Store the ID to that property on the list box's
double-click event, and return that ID in your Unload method.
This works. I do it all the time.
Regards to all,
alistair israel
Distressed DBA, Sleepy SysAd, Weary WebMaster (aka Senior Software Engineer)
aisrael@poboxes.com
Makati City, Philippines