I am developing an ADP in Access 2003. I have a CustomersForm form, which is bound to an Customer table. The form is exhibiting bizarre behavior that I've never encountered before in any other Access-based app.
CustomersForm has an OnDirty event that updates a "Time Modified" field. But when this event fires, the form suddenly sets the focus on the current field, so that all of the text in the current field is replaced. I cannot even use F2 to edit the data in a textbox.
There is no code changing SelStart or SelLength on this form, and SetFocus is not being called. I've stepped through the execution of this form's code and realized that somehow, changing "Time Modified" is responsible for this sudden loss of text selection.
I've written many applications in the past, with similar OnDirty events, but this is the first time that this has happened. What can I do to allow editing of fields without clearing them?
CustomersForm has an OnDirty event that updates a "Time Modified" field. But when this event fires, the form suddenly sets the focus on the current field, so that all of the text in the current field is replaced. I cannot even use F2 to edit the data in a textbox.
There is no code changing SelStart or SelLength on this form, and SetFocus is not being called. I've stepped through the execution of this form's code and realized that somehow, changing "Time Modified" is responsible for this sudden loss of text selection.
I've written many applications in the past, with similar OnDirty events, but this is the first time that this has happened. What can I do to allow editing of fields without clearing them?