I have an MS-Access form with 3 levels of nested forms within it. The second form has two text boxes — first name and last name. For some strange reason, as soon as the user begins to type in the first name, the form attempts to trigger a Save.
How can I figure out who/what/where the save is getting triggered?
I put in a Form_BeforeInsert handler and I can intercept there, but the call stack doesn’t indicate from where the event was tiggered.
Any ideas?
When you switch focus from a control on the parent form to a control on a subform, that switch of focus triggers a save of the parent form’s current record if any of its bound controls contain unsaved values. I don’t think there is any way to prevent or defer that behavior. You either have to allow the record save or discard the changes. You can intercept the form Before Update event to ask the user whether to save or discard, as @woliveirajr suggested. And you can do the same thing for the Before Insert event.