Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing an Excel Spreadsheet into an existing Access Table

Status
Not open for further replies.

4072

IS-IT--Management
Jan 13, 2004
19
0
0
QA
Hi guys, what i would like to do is on my form create a button that uploads a excel spreadsheet that adds to an existing database table. Firstly i need the code that does this and secondly i need to know the format of the excess table, i.e. does it have to have the exact same titles as the access database, i have had problems importing it manually.
 
4072
I have done this simply by copying the rows and columns in the excell spread sheet. Then open the table and click on the next empty "grey" square on table side and paste. only criteria is make sure data type conforms to fields being deposited.
Cliff
 
4072,
Another way,
Create macro use TransferSpreadsheet option follow on screen prompts, there is an option to use first row as field names if you want.
Cliff
 
hi guy's thanks there is only one problem so far for some reason my spreadsheet is not uploading, their seems to a problem where the data is not matching. But i have checked and all the fields are the same so i am not sure what is happening. So far i have written the macro, it starts working until it get's to the cell column that is populated by another table via a drop down menu in a form, the rest of the columns are entered in manually but this column is populated by another table and this is the column that is crashing the macro the fault says " Cell F1 Does not exist in table", any ideas ?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top