By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,222 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,222 IT Pros & Developers. It's quick & easy.

Problem with TransferText

P: 4
Hi All very new to Access... having a problem with TransferText

I am getting the message "Field 'NoName' doesn't exist in destination table" i saw a previous answer to this but it does not seem to apply

here is my code

DoCmd.TransferText acImportDelim, , "dbo_CUST_GS_PL", TargetDir + aFileSpec, -1

here is a snipet from the source file it is a csv file( i Know it is not easy to read, but the last column is "Den Curr Code", The field Issue_id is not in the source file but it is in the table and is filled in later by an update query.

Account Number Quantity Symbol USD Daily Net Security Profit & Loss USD Daily Net Currency Profit & Loss USD Daily Total Net Profit & Loss USD MTD Total Net Profit & Loss USD YTD Total Net Profit & Loss Den Curr Code
4L1X0409 0 QAA JAN 06 80 C 0 0 0 0 17950.8 USD
4L1X0409 0 QAA JAN 06 80 P 0 0 0 0 -129300 USD

FROM ACCESS THE TABLE LAYOUT IS
FIELD NAME DATA TYPE
Date Date/Time
Account Number Text
Quantity Number
Symbol Text
USD Daily Net Security Profit & Loss Number
USD Daily Net Currency Profit & Loss Number
USD Daily Total Net Profit & Loss Number
USD MTD Total Net Profit & Loss Number
USD YTD Total Net Profit & Loss Number
Den Curr Code Text
Issue_ID Number

HELP, HELP, HELP
THANKS

BEN
Oct 15 '06 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 1,221
Ben,
I think maybe you need to change either your first line in the input text file, or a data element in the table that will hold the incoming text. You specified a -1 for the last parameter explicitly given ... that means the incoming table has the field names in the first line. I suspect that the field names given in your text file are not the same field names found in your table dbo_CUST_GS_PL.

So change the text file, or change the name of the field in the Access table, or change that -1 parameter to 0. If you do the parameter change, then your first line of text will be imported into the table as if it were data (which it might be).

Jim
Oct 16 '06 #2

P: 4
Ben,
I think maybe you need to change either your first line in the input text file, or a data element in the table that will hold the incoming text. You specified a -1 for the last parameter explicitly given ... that means the incoming table has the field names in the first line. I suspect that the field names given in your text file are not the same field names found in your table dbo_CUST_GS_PL.

So change the text file, or change the name of the field in the Access table, or change that -1 parameter to 0. If you do the parameter change, then your first line of text will be imported into the table as if it were data (which it might be).

Jim
Jim - thanks for responding. My source data file

1. source file does have the first row as column headings
2. However there is not 100% match between the source file and the Database. A couple of columns in the database table are to be populated thru another update query. IS this the problem... does there need to be a 100% match between source and destination ????? i thought or assumed that any column headings present in the table but not in the source would just be bypassed is this a wrong assumption ????

3. The first line of text in the source .csv is Column name information Not data so setting the last parameter to 0 is not somthing i can do with this particular file.

The key question is in Point 2 - does there need to be a 100% match between source and destination ?????
Oct 16 '06 #3

Post your reply

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