Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-06-13
3
Medium Priority
?
4,254 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 375 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

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

705 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