>>This is true, but doesn't that "break" the encapsulation of the data, now that the form has to know something (like the variable name) that's outside of it's own definition?
>
>no because you do the CreateObject in the QueryUnload event and return its reference there - where does that breaks the encapsulation?
>
>Arnon
Arnon,
It doesn't break encapsulation but it certainly provides tight external coupling as the calling routine must know the name of the reference to the object and the form must always use the same name.
It is a much better design to pass the parameter object into the form and then let the calling code read the object after the form has terminated. That way the calling routine create the object, the form receives it as a parameter, and the calling routine can investigate the object to see what the form has done to it.