SBendBuckeye
Programmer
I have a bound form with command buttons for Add, Edit and Delete along with Save and Cancel and navigation buttons. The default mode is edit mode so the user doesn't have to click Edit on every record.
If they click Add then all buttons except Save and Cancel are disabled. I want to do the same thing if the user actually makes any changes to the current data.
When I try to use the form's OnDirty event to disable the other buttons similarly to the Add or Edit click events, I lose the data. I have tried setting KeyPreview to both True and False and it doesn't make a difference.
For example, say I click on txtAddress and begin to type in Abcd. The OnDirty event properly causes the command buttons to be disabled, but Abcd never appears in txtAddress. Any ideas what is causing this behavior?
Thanks in advance for any help you can give me!
If they click Add then all buttons except Save and Cancel are disabled. I want to do the same thing if the user actually makes any changes to the current data.
When I try to use the form's OnDirty event to disable the other buttons similarly to the Add or Edit click events, I lose the data. I have tried setting KeyPreview to both True and False and it doesn't make a difference.
For example, say I click on txtAddress and begin to type in Abcd. The OnDirty event properly causes the command buttons to be disabled, but Abcd never appears in txtAddress. Any ideas what is causing this behavior?
Thanks in advance for any help you can give me!