Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Procedural Code
Message
From
30/10/1998 12:24:54
Ian Matthews
Up & Running Technologies Inc
Chestermere, Alberta, Canada
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Procedural Code
Miscellaneous
Thread ID:
00152898
Message ID:
00152898
Views:
48
I can not find a place to put procedure code that will allow me to modify a form. Specifically if a simple test is .t. then I want several fields on a form to be disabled.

All of my other PROCEDUREs are stored in my main program. However if, in my main program, I put PROCEDURE code that changes a the ENABLED property of a field, I get one of two errors:

1: if I use THISFORM.FIRST_NAME.ENABLED=.f., VFP informs me that THISFORM can only be used in a form, not a program, or;

2: if I use the name of the form CONTACTS.FIRST_NAME.ENABLED=.f. VFP informs me it can not find the object CONTACTS.

This code is specific to one form so I thought I would try to put the code in the INIT method of the form but VFP informs me that METHODS AND EVENTS CAN NOT CONTAIN NESTED PROCEDURALS. I am fairly certain that this is where I put PROCEDURE code using FP2.6 but apparently it has changed.

Where can I put reusable code that makes changes to a fields properties on a form?
Next
Reply
Map
View

Click here to load this message in the networking platform