General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only