Solved

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

Posted on 2006-06-13
3
4,075 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 66

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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

626 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