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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add data from Excel

Status
Not open for further replies.

44nato44

Programmer
Dec 12, 2008
115
NL
Now I have been looking all over the internet and have not been able to find anything I can use.

The only thing I want is to take data from an excel sheet and copy it to the ms access database.

The only thing which comes to mind is take one field per time, which cannot be right.

I am not sure if creating a range in the excel sheet would be an idea, or make the sheet into a recordset and copy the data to the database that way.

I hope somebody has some nice code I can use.

Cheers
 
and it needs to be done with code, as it needs to be automatically
 
Have a look at the DoCmd.TransferSpreadsheet method.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Sorry not my day to write this.. the code run in one MS Access database and writes to another

This is because we are linking data to the main MS Access database where the load form reside.

I do not believe I can use transferspereadsheet to import to another MS Access ?
 
So, Have a look at the DoCmd.TransferDatabase method.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
hrmmm.. I looked at it and it does not make much sense to me

Can you advice how it will look if I want to import an excel sheet into a ms access DB which is not the one where the code is running on ?

Thanks
 
I do not believe I can use transferspereadsheet to import to another MS Access
Can't you import to a linked table ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I see where you are going, but the database is password protected and I am not sure I can password protect a single linked table

Then I will need to set up user permissions which I am not interested in

So if there is a way to no have this database linked or anything that would be the best.

I might just be a bit out of my league or what I want to do is a bit complicated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top