Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameter Passing - 'File 'startedit.prg' does not exist
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00123181
Message ID:
00123203
Views:
31
Your problem is that VFP doesn't search the current class for methods when you try to do a program within a method. You need to tell VFP that you're running a method of the current object. Try this: THISFORM.StartEdit(.F.)

>I have a Form for adding records called frmAddRec.
>
>I have created a New Method called StartEdit to disable/enable certain editable fields on the form depending on whether the user is in record selection mode or has already selected a record and is in edit mode.
>
>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. TIA, CH.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform