Unanswered: Movefirst function messes up pasted data from Excel (MS Access 2010)
I am working on a database in which I manually paste data from Excel into a subform i MS Access, which is linked to a table.
The table consists of an index column, which labels each "batch" of pasted data. This index grows by one from each time I paste the data.
I use the Movefirst - Edit - Update functions in the "AfterUpdate" module to change the index value each time the data is pasted.
Just pasting the data is not a problem. The problem is that when I change the index number the first row of data in my Excel sheet is deleted and an additional row below my Excel data is created and selected in edit mode.
The consequence of this is that the table, which the subform is linked to, is not updated instantly.
I can solve this by inserting a blank row in row 2 of my Excel sheet, by pressing escape and hitting refresh.
I would however like this to happen automatically as I am building the database to some end users who don't know MS Access.
Without more info on what precisely what you are trying to do it is difficult to be sure what to suggest, but one thing that is a bit odd is you are updating a record without changing anything.
ie. I think this
RunVersion = rs1![RunNbr]
should by this
rs1![RunNbr] = RunVersion
An alternative approach might be to use an Update query executed against the required table?