Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing parameters to generalised prompt/edit form
Message
De
11/02/2002 06:29:54
John Faithfull
Hunterian Museum, University of Glasgow,
Glasgow, Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Passing parameters to generalised prompt/edit form
Divers
Thread ID:
00618212
Message ID:
00618212
Vues:
60
Hello folks,

It's a few months since I did any VFP programming, and I'm feeling pretty dim.

I want to create a simple form which will allow the value of any variable to be displayed and/or edited. There are two parameters, the variable name, and a caption for the form. eg

do form "editvar.scx" with "dInitdate", "Enter the starting date"

Will allow the user to see the current value of dInitdate, and edit it if desired.

The parameters cVarname and cCaption are passed as lparameters to the Init event of the form.

Two questions:

(1) How do I display the current value of the variable in a Text Box (eg dInitdate in the above example)? I've tried various variations on

dCurVal=evaluate(cVarname)

without consistent success.

(2)Secondly, once changed, how do I update the value of the original variable when the OK button is pressed? &cVarname=dCurVal seems to work in the command window, but gives an error in the Click event of the button.

Can anybody help, or point to some existing example which will carry out the same function? Ideally, for any variable whether date, character or numeric...

Apologies if this is not very clearly expressed...

Thanks

John
Dr. JW Faithfull
Curator in Geology
Hunterian Museum
University of Glasgow
Glasgow G12 8QQ
Scotland
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform