D
David
Hello ol wise ones,
I am importing an excel spreadsheet to my Access 2002 table. I have set the
Excel NAME range to all rows in columns a thru g, named "Info" I have the
vba code in Access to that works fine.
'by sight
docmd.transferspreadsheet acimport, , "temp_Excel_Info", strInputFileName,
True, "Info"
I would like to use a field named "ROW" in temp_Excel_Info table that would
store the corresponding ROW number of the excel spreadsheet so if there is a
validation error, I can use the ROW number in a message box to the user. I
have thought about using the ID (autonumber) field plus 1 since row 1 of the
excel spreadsheet is column names, but that goes to over 65,000 when
importing. I have a query to delete the blank rows in the table, but when
user imports another spreadsheet, the ID starts at 65,000.
I could compact and repair before import to reset the autoid, but not sure
that is practical with Runtime users.
Can I run an update query to populate the ROW field in table tmp_Excel_Info
that would be the record number in the record set?
if so, what would this query be?
If not, is compact and repair before import the best method?
Any assistance is greatly appreciated.
I am importing an excel spreadsheet to my Access 2002 table. I have set the
Excel NAME range to all rows in columns a thru g, named "Info" I have the
vba code in Access to that works fine.
'by sight
docmd.transferspreadsheet acimport, , "temp_Excel_Info", strInputFileName,
True, "Info"
I would like to use a field named "ROW" in temp_Excel_Info table that would
store the corresponding ROW number of the excel spreadsheet so if there is a
validation error, I can use the ROW number in a message box to the user. I
have thought about using the ID (autonumber) field plus 1 since row 1 of the
excel spreadsheet is column names, but that goes to over 65,000 when
importing. I have a query to delete the blank rows in the table, but when
user imports another spreadsheet, the ID starts at 65,000.
I could compact and repair before import to reset the autoid, but not sure
that is practical with Runtime users.
Can I run an update query to populate the ROW field in table tmp_Excel_Info
that would be the record number in the record set?
if so, what would this query be?
If not, is compact and repair before import the best method?
Any assistance is greatly appreciated.