Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Control source depends on the _screen.ActiveForm
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01547969
Message ID:
01548072
Vues:
71
This message has been marked as a message which has helped to the initial question of the thread.
I guess you could change the IF to include the name of the form too.
if type(m.lcScreenObject + '.name') = 'C' and lower(getpem(m.lcScreenObject, 'Name')) = 'the_form_that_needs_to_be_updated'
But to be honest the code looks just bizarre :)

>Hi everybody,
>
>I have this code (not sure why it's referencing _screen.ActiveForm)
>
>
>lcObject=sys(1272, this.parent)
>		lcScreenObject = "_SCREEN.activeform." + justext(m.lcObject)
>		if type(m.lcScreenObject + '.name') = 'C'
>			lcCostSource = m.lcScreenObject + ".a_cost(&lcRecn,&lcColIndex)"
>
>			.cnt_PurchOrd.spn_Cost.controlsource = lcCostSource
>
>			lcRecvSource = lcScreenObject  + ".a_Recv(&lcRecn,&lcColIndex)"
>			.cnt_PurchOrd.spn_Received.controlsource = m.lcRecvSource
>
>			.cnt_PurchOrd.txt_OnHand.value = evaluate(lcScreenObject +".a_OnHand(&lcRecn,&lcColIndex)")
>			.cnt_PurchOrd.txt_lstCost.value = evaluate(lcScreenObject +".a_LastCost(&lcRecn,&lcColIndex)")
>			.cnt_PurchOrd.txt_OnOrder.value = evaluate(lcScreenObject +".a_OnOrd(&lcRecn,&lcColIndex)")
>		endif
>
>
>when the ActiveForm changes, it gives an error. Is there any way to make the above conditional in the ControlSource?
>
>Thanks in advance.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform