>The form is opened from the Click event of a button on another form.
>
>Ben Holton
Aha!
Either:
1)The variable assigned with CREATEOBJECT() is going out of scope.
2)or there is no variable assigned with CREATEOBJECT() - there needs to be one.
I would recommend one of two things to prevent it going out of scope:
1) Make the called form modal. This may not be what you need, since the modal form will not return control to the app until it is released or hidden (with a
form.Hide() ).
2) If modal won't work - assign a the form to an object property on the calling form - e.g., in the calling form, add a custom property called oCalledForm (or whatever) then
** button Click()
thisform.oCalledForm = CREATEOBJECT("myform")
The called form will go away when the calling form is released.
Insanity: Doing the same thing over and over and expecting different results.