Connecting Tech Pros Worldwide Forums | Help | Site Map

Macro to import the spreadsheet with indexed field (* AUTO NUMBER)

Newbie
 
Join Date: Nov 2006
Posts: 1
#1: Nov 14 '06
I can import the EXCEL spreadsheet using the macro in ms access but the table is not indexed with the Autonumber as we get in the manual import operation.

Please assist me to get the indexed data with the import values ,as I need to replace the database daily with the new values keeping the index as the key value.

NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,730
#2: Nov 14 '06

re: Macro to import the spreadsheet with indexed field (* AUTO NUMBER)


Try importing the data into one table, then run a query which selects records from that table and appends them to the main table afterwards. If you need to, you can run another query which clears down the main table beforehand to have a clean dataset of only the new items.
Reply