Hi there,
Does anyone have a reliable method of getting Access to run code in response to the user pasting some records into a subform?
After_update and After_insert do technically work, but they cause the code to run after the insertion of each individual record. So it runs 100 times if you paste 100 records. This is not desirable.
I have also tried some messing around with timers and counting the number of records once every second to look for changes. I do not like this approach much. It sort of works, but it causes the code to run immediately after the paste but BEFORE the user has clicked the little confirmation message that Access automatically generates which prompts the user to confirm the paste. It needs to only run once they've committed to the paste!
I also tried hiding a textbox in the header of the form which counts the records and looking for changes in that number. This works fine for detecting deletion of records, but doesn't detect new ones being pasted in.....
I'm sure there must be a simple (probably well known) solution for this, but I haven't found it yet.
Many thanks!
Does anyone have a reliable method of getting Access to run code in response to the user pasting some records into a subform?
After_update and After_insert do technically work, but they cause the code to run after the insertion of each individual record. So it runs 100 times if you paste 100 records. This is not desirable.
I have also tried some messing around with timers and counting the number of records once every second to look for changes. I do not like this approach much. It sort of works, but it causes the code to run immediately after the paste but BEFORE the user has clicked the little confirmation message that Access automatically generates which prompts the user to confirm the paste. It needs to only run once they've committed to the paste!
I also tried hiding a textbox in the header of the form which counts the records and looking for changes in that number. This works fine for detecting deletion of records, but doesn't detect new ones being pasted in.....
I'm sure there must be a simple (probably well known) solution for this, but I haven't found it yet.
Many thanks!