If you paste a sub into the VBA editor whose name matches the convention for an event handler (e.g. Form_BeforeUpdate
), Access will silently wire up that sub to the matching event on the form, without telling you. This applies even if there was already a sub with the same name in the file that wasn't wired up to the corresponding event.
Opening a form class module, and typing Ctrl-A, Ctrl-C, Ctrl-V is sufficient to trigger this. I cannot find any documentation for this behaviour.