Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do form - object formname not found
Message
 
 
To
11/06/2006 12:03:31
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP
Network:
SAMBA Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01128327
Message ID:
01128342
Views:
14
Paul,

Pass a reference to the parent from to the child form:
do form form2 with thisform
In the form2.Init() save the parameter to a proprty that will allow you to reference the parent form:
*form2.init()
lparameter roCallingForm

this.oCaller = roCallingForm


* save code
this.oCaller.xyz = thisform.txtXYZ.Value


* form2.Destroy()

this.oCaller = .null. && clear the reference
>I have a form (form1) with a list box. in the doubleclick event, i have "do form form2". you can make changes in form2. in the click event for form2's save button, i try to change some of the properties of some of the controls on form1.
>
>within the project manager, this works fine. however, in the executable, i get "object form1 not found", which is error 1923.
>
>i did some searching and found that once the code is executed in one form to open another form, the form object is released from memory. it states to use activeform, forms, and formcount properties to access the form. However, i've looked these up and don't understand how to "reactivate" form1 as an object without having to release the form and then do "do form1".
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform