?
Solved

Excel Import to Access

Posted on 2013-10-31
2
Medium Priority
?
268 Views
Last Modified: 2013-10-31
Dear Experts

This is a really weird one ...  I am trying to import an excel spreadsheet into Access using the following code:

DoCmd.TransferSpreadsheet acImport, , "SMS Import", "C:\Users\xxxx\Desktop\SMS Import.xlsx"

Open in new window


I keep getting an error saying "Field F1 doesn't exist in destination table 'SMS Import'" - so to make sure I wasn't missing anything I exported the data that already existed in the table to excel and then tried to reimport it - I still got the same error!

Any ideas - I have tried adding a reference to Microsoft Excel 14.0 Object library as well as Microsoft Office 14.0 Object library - no difference though
0
Comment
Question by:correlate
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 2000 total points
ID: 39614270
Hi,

pls try because of no field names
DoCmd.TransferSpreadsheet acImport, , "SMS Import", "C:\Users\xxxx\Desktop\SMS Import.xlsx", False

Open in new window

Regards
0
 

Author Closing Comment

by:correlate
ID: 39614285
perfect - thank you, I used true rather than false at the end as the spread sheet had headers & that did the trick
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question