Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refferences to FormSet
Message
From
13/05/1998 14:57:03
 
 
To
13/05/1998 14:50:15
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00099158
Message ID:
00099160
Views:
20
>Hello everyone!
>Here I'm experiencing a terrible situation. I have a main form and trying to run another form which is actually formset by simply pushing a command button, and click event has just a classic DO FORM mr.
>FormSet.Name is frmSetMedia has a form frmMedia. The question is ? How I can make a refference to frmMedia.txtText.Value.
>
>I was trying
>
>mr.frmMedia.txtText.value
>frmSetmedia.frmMedia.txtText.Value
>
>It does not work and gives me an error - object does not exist or something. Does anyone know what is happening?

There two error-proof ways to reference tables:
1) Any time you want to make a reference you go through Forms() collection of _SCREEN, i.e.
For n=1 to _screen.formcount
 if _screen.forms(n).name=="MYFORMNAME"
   oRef=_screen.forms(n)   && and you use this reference
   exit
 endif
Endfor
2) You link the form with specific property with trustworthy scope
DO FORM myform1 NAME oApp.Myform1 LINKED
Now you can always make reference by oApp.Myform1.Text1....
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform