Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form refresh problem
Message
 
To
25/02/2000 22:37:41
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00337991
Message ID:
00338135
Views:
15
>I start Form1 from a program "do form Form1". On Form1 there is a command button that starts Form2 - "do form Form2". On Form2 there is a command button that starts Form3 - "do form Form3". With Form3 active I press another command button that has the code "Form1.refresh". That works fine. There is yet another command button that the code "Form2.refresh". When I press that button I get an error that says "Object Form2 not found". What am I doing wrong?
>
>Nothing, since form1 lives within a private variable of a program, its available to all methods, but since form2 lives in a method (ok, event: CLick()) its object reference goes out of scope instantly so you can't reference it that way.
>
>What you need to do is either decalre form2 as a PUBLIC variable before you DO FORM form2, keep passing these references along the forms, or make the forms modal.

Could you explain how I declare the form as a public variable and pass the reference along the forms?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform