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:
00123182
Vues:
20
>>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,
>
>Double click it in the properties sheet and you will be in the code editor editing that method. Then you write code like you would anyhere else;
>
>
>LPARAMETERS plEdit
>IF plEdit
>   * set up for editing
>
>ELSE
>   * set up for record selection
>
>ENDIF
>
Jim,

I think I've almost got it, but still having trouble making it work.

StartEdit is coded in the following fashion:
LPARAMETERS plEdit
IF plEdit = .T.
	*Setup for Editing
	blah, blah, blah
ELSE
	*Setup for Record Selection (disable editing)
       blah, blah, blah
ENDIF		
I am trying to call StartEdit from the Form's Init, passing .F., so that the Form is put in record-selection (non-edit) mode. The code I have in the Form's Init is:
DO StartEdit WITH .T.
When I attempt to run the Form, I get a Program Error as captioned in the Subject of this thread. This is my first atttempt at this type of construct in VFP, and I would be most appreciative for help. Also, I noticed you used the prefix 'pl' in 'plEdit'. What's the significance? TIA, CH.
Chuck Henry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform