473,411 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Error Importing Spreadsheet

I'm fairly new to VBA, but I have imported Excel files into a tbl using VBA before and it worked. This time I am getting an error that says

Field 'F1' doesn't exist in destination table 'tblWhatever'

Can anyone point me in the right direction? I have already spent a lot of time re-checking the calling parameters, Excel file and table design many times over.

Thanks so much!
Jun 13 '07 #1
5 2416
ADezii
8,834 Expert 8TB
I'm fairly new to VBA, but I have imported Excel files into a tbl using VBA before and it worked. This time I am getting an error that says

Field 'F1' doesn't exist in destination table 'tblWhatever'

Can anyone point me in the right direction? I have already spent a lot of time re-checking the calling parameters, Excel file and table design many times over.

Thanks so much!
I'm not sure what causes it, but adding Field [F1] to 'tblWhatever' prior to the Import will solve the problem.
Jun 13 '07 #2
I'm not sure what causes it, but adding Field [F1] to 'tblWhatever' prior to the Import will solve the problem.


I did try that, but then the error says

Field 'F2'...

I added "F2" and it said

Field 'F3' doesn't exist...
Jun 13 '07 #3
I'm not sure what causes it, but adding Field [F1] to 'tblWhatever' prior to the Import will solve the problem.

Can you offer any help on this?

As I mentioned, I had already tried this, but it didn't work.
Jun 14 '07 #4
ADezii
8,834 Expert 8TB
Can you offer any help on this?

As I mentioned, I had already tried this, but it didn't work.
Make sure that the hasfieldnames Argument is specified correctly:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.TransferSpreadsheet [transfertype][, spreadsheettype], tablename, filename[, hasfieldnames[, range]
Jun 15 '07 #5
Make sure that the hasfieldnames Argument is specified correctly:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.TransferSpreadsheet [transfertype][, spreadsheettype], tablename, filename[, hasfieldnames[, range]

Yes, I needed to specify 'TRUE' for that argument! Problem solved.

Thank you for your help.
Jun 19 '07 #6

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

Similar topics

4
by: Little PussyCat | last post by:
Hello, I nee to write something that will transfer excel data into an SQL Server table. I have for another database application I wrote have it importing Excel spreadsheet data using cell by...
2
by: Mr. Bungle | last post by:
When importing excel from access I am fully aware that one can import directly into a table. Can you get as specific via code or something to import data from an excel sheet to a FORM (Not Table)...
2
by: Mr. Bungle | last post by:
When importing excel from access I am fully aware that one can import directly into a table. Can you get as specific via code or something to import data from an excel sheet to a FORM (Not Table)...
2
by: Don W. Reynolds | last post by:
Hi All, I am sent an excel spreadsheet on a daily basis. Sometimes it contains 10 rows; sometimes it contains over 5000 rows. I copy this spreadsheet into another spreadsheet and verify the...
3
by: D.Stone | last post by:
I'm trying to import an Excel spreadsheet into an existing Access table using Office 2003. Ultimately, the plan is to do it programmatically using TransferSpreadsheet, but to check that the file...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.