Hi, everyone.
I'm using Access 2016 and building a datasheet form where users can update the details of products they are bringing into the business. I have a simple change log / audit function built that works perfectly when a user changes one field at a time. However, if the user copies multiple fields from another source (notepad, Excel, etc.) and pastes them into the data sheet, I get an error before the audit function fires that says:
Run-time error '2474':
The expression you entered requires the control to be in the active window.
The code is:
Code:
Private Sub ACE_Part_Description_Line_3_AfterUpdate()
Call LogPartChange(Forms!frm_Main!fsub_MainSubform.Form.ActiveControl)
End Sub
I thought it might be because of the pop-up asking if the user is sure they want to paste the records, but disabling that didn't help. How can I navigate my way around this so that each pasted field gets a record in my change log table?