By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,426 Members | 3,407 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,426 IT Pros & Developers. It's quick & easy.

Importing Excel into Access 2007

DAF LAD
P: 8
Hi all,

I have been running a database in Access 2003 for may years now.

One of the update functions that I do imports an excel spreadsheet into a table in my database. I have this automatically working from a command button through vb code.

Recently I have upgraded my office suite to the 2007 edition. Now when I try to run this command from this button I get an error code saying that something is missing (in the access file nothing I have written). I have created these as imports from external data and saved them so that I can click on the "saved imports" icon for now but I was wondering if there is a way of running these saved imports from a command button (through vb code or embedded macros) as my original code does not seem to work

Thanks in advance

Diego
Mar 12 '08 #1
Share this Question
Share on Google+
2 Replies


cori25
P: 83
Can I see the code that you are using, please.
Mar 12 '08 #2

DAF LAD
P: 8
the code that I have been using is as follows:

Private Sub Import_PBs_Click()
DoCmd.TransferSpreadsheet acImport, 0, _
"z new pbs", "....\new pbscrs\newpbs.xls", True
End Sub

where "z new pbs" is the table in access

Thanks again

Diego
Mar 12 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.