Paste from Excel Not Firing AfterUpdate Event

GailFialho

Registered User.
Local time
Today, 05:06
Joined
Nov 20, 2001
Messages
34
I have structured a subform as a datasheet to allow users to copy and paste from Excel into the database. Datasheet has numerous fields and 18 rows. I have set up recalculations of other data in the AfterUpdate event of the fields in the datasheet. This works perfectly until the user copies multiple rows from Excel and pastes them (one column at a time) into the datasheet.
Is there an event I can capture when the user copies and pastes a column?
Muchas-Grasias for any assistance.
 
Help!

Have I not explained the problem properly:confused:
Is there no one out there that has seen this problem?
 
Apparently Access uses a different process when updating multiple records than when it is working with a single record. With multiple records it probably uses a transaction type update. We may wish it otherwise, but it does make sense that they would suppress custom code when updating multiple records. Considering that any number of actions may be required in your code, I would have designed Access to suppress user code in such a case.
 
Thanks ray705 for the response.
I will wait a few days before redesigning to see if anyone else may have a solution.
 
Try using the Change event if there is one, if not then the KeyPress or KeyUp event and see if that does the trick, since a Copy/Paste is a key feature (ctrl+v). AfterUpdate is usually triggered when the control loses focus.
 
another choice would be to manually insert the data into the database, for example have a button that says "Copy From Excel" and have that button parse the clipboard and insert it into the database, and then call whatever else you need to be called after that update.
 

Users who are viewing this thread

Back
Top Bottom