Link from Excel to Access

  • Thread starter Thread starter abc0707
  • Start date Start date
A

abc0707

Guest
Here is the problem:
I have a table from Excel and I want to import to Access, how can I do it ? and what is the script to creat a button to automatically do it ?
and I want to update the table each month, therefore the access-table should have new data from Excel for each month, and it still has the old data

Thanks
 
first things first...what do you want to do with the old data at the end of the month?
do you want to discard it or archive it?


al
 
I still want to keep in that table, just continue add data in that table
 
ok.

start by looking in help for : Import Spreadsheet Wizard
i suggest you use a copy of your table for testing purposes!
this will give you an idea of how it works.

when you are comfortable that it is populating your table correctly:
look in help for: TransferSpreadsheet Method

you can call this from a command button with:

DoCmd.TransferSpreadsheet [transfertype][, spreadsheettype], tablename, filename[, hasfieldnames][, range]

be sure to look at the example to get the syntax right. also, be aware that it will be your responsibility to be sure that your users don't import the same data more than once. so make sure your table design will not permit this.

hth,
al
 

Users who are viewing this thread

Back
Top Bottom