Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invoking a procedure on a control on a form
Message
De
11/04/2005 09:59:30
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01003336
Message ID:
01003340
Vues:
21
>I have a procedure named basearti in a program called findart. Here is my program:
>
>
>PROCEDURE basearti()
>	STORE "F*0001" TO cArtikey
>ENDPROC
>
>
>When my form is shown in the text1 field I want to display the contents of the variable cArtikey.
>
>Can anybody help me in where I would put my code on the form or text1 control so that it shows the value of the variable cArtikey? Many Thanks

You can't make a procedure as a control sopurce because the procedure doesn't returns values. Make it function:
FUNCTION basearti()
   STORE "F*0001" TO cArtikey
   RETURN m.cArtikey
ENDFUNC
Add a property of your form and set The controlSource of the TextBox to it, in Init event of the form:

thisform.BaseArtiProp = BaseArti()
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform