I see a problem with my code which comes from the EDIT button; the code sets the focus to the Work Order Textbox which checks the status of the control to see if any data has been changed. If no data is changed as you are losing focus (LOSTFOCUS), then the CANCEL button is disabled. Maybe I need to turn off the SetFocus() for the textbox and see what happens.
>I just wanted to check ReadOnly and Enabled properties of the Cancel button after you clicked on the Edit button. You can add this code in Click method, doesn't matter.