Hi David,
>I want to refer to a value of a control in a form from a program by using the following code.
>resphead.comp_code.value
>resphead is the form file name and comp_code is the name of the control on the form. If the form is modal everything works fine. But if the form is modeless Foxpro can't evaluate it. Why?
What is your DO FORM? Try using the NAME and LINKED clause of DO FORM to create an object reference for you:
DO FORM Forms\RespHead NAME resphead LINKED
And make sure the variable doesn't go out of scope.
What is the path code follows between your DO FORM and the line you gave in a PRG? That could be effected greatly by the state of the form.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement