Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form For Adding Records - Prob w/ Clicking Elsewhere on
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00122835
Message ID:
00123054
Vues:
13
>Chuck,
>
>You can make your life much easier if you move the code that has nothing to do with the combo out of the combo. Create a method fo the form named StartEdit, give it a parameter that is logical, .T. means start an edit and .F. means end the edit. In teh form's StartEdit you write all of theenabling and disabling code in a IF Parameter construct. You call the startEdit from the form's Init passing .F. so the form is put in non-editing mode. From the combo's when or valid you can call teh startedit and pass .T. so the form goes into editmode. From the Save and Cancel buttons, you again call the fomr's startedit passing .f. after the saving is done.
>
>By approaching it this way you have one place where all of the enable/disable code resides. If it is working great, if not there is only one place to go.

Jim,

Thanks a lot for the help. With frmAddRec open, I have clicked on Form > New Method... > Gave the method the name of StartEdit > and clicked on Add. This is my first time for creating a new method. I can see it listed along with the other PEMs in the Properties of my Form. It has [Default] as its behavior. How do I give it a parameter that is logical, .T. means start an edit and .F. means end the edit?
Chuck Henry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform