Solved

Runtime-Error ‘2391’: Field 'F1' doesn't exist in destination table

Posted on 2006-06-13
3
3,866 Views
Last Modified: 2008-01-09
I have a table (tbl_RBaze_imp)with column names.  I am trying to import a excel spreadsheet (  ) using the below script.  However, I get the error message;

Runtime-Error ‘2391’: Field 'F1' doesn't exist in destination table 'tbl_RBaze_imp.'

One thing I noticed is that I do not see the "Advance" option when attempting to setup a import specification.  I am using Access2002.  Is there a preference, property or something that will enable this option.  Or maybe it has nothing to do with the error message.

xpath = "C:\Documents and Settings\Bazen.xls"

DoCmd.TransferSpreadsheet acImport, , "tbl_RBaze_imp", xpath, False, bazeexport

Thx
Mahonek
0
Comment
Question by:Mahonek
[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
3 Comments
 
LVL 65

Expert Comment

by:Jim Horn
ID: 16899489
>xpath = "C:\Documents and Settings\Bazen.xls"
I believe this is your problem.  Import Specifications are only for .txt and .csv files, not .xls files.  
You will not be able to create an Import Spec for Excel files.

>Field 'F1' doesn't exist in destination table
Last I remember, if you try to import but do not specify field names, Access will name the fields F1, F2, F3, etc.

>One thing I noticed is that I do not see the "Advance" option when attempting to setup a import specification.
The normal path is File menu, Get External Data, Import..., then choose a Text file in the dialog, hit the Import... button, and the Advanced button appears.  Works on my XP box.

Hope this helps.
-Jim

0
 
LVL 34

Accepted Solution

by:
jefftwilley earned 125 total points
ID: 16902833
Could you make a link table out of the excel spreadsheet, then do a simply update or append query to get the data into your target table?
J
0
 

Expert Comment

by:svetlana20in
ID: 25895271
Rename your target table columns as F1, F2, F3 etc and run the code, It worked for me.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

762 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