J
Josh Golden
3 forms.
form 1, when button clicked instantiates form 2 which opens but is not
shown. form 2 instantiates form 3 as showdialog. form 3 finishes, raises
an event that form 2 catches. during the catch, form 2 closes and disposes
the instance of form 3, opens itself as showdialog, and displays some data
to the user. the user can select one of these data and upon doing so raises
an event that form 1 catches (and closes and disposes of form 2). all is
good.
but following the same scenario, if after form 3 is closed and disposed and
form 2 uses me.showdialog. if the user doesn't like the data he can click a
button on form 2 and instantiate form 3 again. when that button is clicked,
form 2 calls me.hide because I can't close form2. problem is when form3 is
closing again, it raises an event which form2 catches, but that event wants
to call me.showdialog. at this point, i have called me.showdialog twice
which is no good.
so basically i want this
if me.<someproperty> = "IwasOpenedAsShowDialog" then
me.show
else
me.showdialog
endif
thanks
form 1, when button clicked instantiates form 2 which opens but is not
shown. form 2 instantiates form 3 as showdialog. form 3 finishes, raises
an event that form 2 catches. during the catch, form 2 closes and disposes
the instance of form 3, opens itself as showdialog, and displays some data
to the user. the user can select one of these data and upon doing so raises
an event that form 1 catches (and closes and disposes of form 2). all is
good.
but following the same scenario, if after form 3 is closed and disposed and
form 2 uses me.showdialog. if the user doesn't like the data he can click a
button on form 2 and instantiate form 3 again. when that button is clicked,
form 2 calls me.hide because I can't close form2. problem is when form3 is
closing again, it raises an event which form2 catches, but that event wants
to call me.showdialog. at this point, i have called me.showdialog twice
which is no good.
so basically i want this
if me.<someproperty> = "IwasOpenedAsShowDialog" then
me.show
else
me.showdialog
endif
thanks