The form initializes and sets all fields to NOT enabled using a function called SETMODE. SETMODE uses one parameter, a logical value, which tells it whether to set enabled on or off. actually code within setmode is
lparameters lMode
thisform.setall("ENABLED",lmode)
Screen is displayed with all fields turned off and Action buttons turned on. Click on edit button and
1) A flag for edit mode is turned to true (thisform.ledit = .t.)
2) setmode is called with a .T. parameter (thisform.setmode(.t.))
3) Action buttons are turned off and Save/Undo buttons turned on.
4) the focus is set to the first non-key field
As soon as the setall line is performed, the screen displays the fields as editable!
Let's close the screen and call it fresh. Screen is displayed with all fields turned off and Action buttons turned on. Click on the ADD button and:
1) A flag for ADD mode is turned to true (thisform.ladd = .t.)
2) Fields are set to empty or default values.
3) Setmode is called with a .T. parameter (thisform.setmode(.t.))
4) Action buttons are turned off and Save/Undo buttons are turned on.
5) The focus is set to the first non-key field.
When the setall line is performed, nothing happens.
There are NO lockscreens anywhere in the code. Both buttons use the exact same function to set the fields on. The only difference is that one function is using the current record in the table and the other is using default values. Why won't the fields turn "ON" when we move through the setall line? The line IS being hit in both instances.
As I said, this does not make any sense. Any help would be appreciated.
Vicki Combs
Customized software for today AND tomorrow...
Applications and web sites designed, developed and maintained. (MBE)
"Change is inevitable...unless that's changed!