Thanks for your reply Peter
Peter Cushing wrote:
> I do something similar with my forms:
>
> IF WEXIST('Sampcomm')
> SHOW WINDOW sampcomm
> ELSE
> DO FORM sampcomm
> ENDIF
>
>
> I also have some public variables floating in the background and I can
> set these from one form, then call the code above and look for them in
> the activate. Do whatever is needed and blank them off. That works
> nicely. If you want any more detials let me know.
I found that this approach (SHOW WINDOW ChildForm) does not seem to
actually fire any events of ChildForm - not when I tried it and
ChildForm not only WEXISTs but is also WVISIBLE. However I found that
the following approach (which avoids having a PUBLIC ChildWindow and
would therefore, I hope, be preferred by Tracy) also works very well:
IF NOT WEXIST("ShowData")
DO FORM ShowData WITH THISFORM.TargetForm,"aShowData"
THISFORM.ChildForm = ShowData
ELSE
THISFORM.ChildForm.Refresh(THISFORM.TargetForm,"aShowData")
ENDIF
By storing a reference to ShowData in the ChildForm property of the
parent/calling form the first time (DO FORM Showdata) I am able to
reference subsequently it if it already exists.
Cheers
Paul Newton
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.