Field "NoName" doesn't exist in destination table

yalti

New Member
Joined
Nov 16, 2022
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hello, thanks for reading.

I am trying to setup a macro in Access.

Part of the macros is importing a csv into a table in Access.

I keep on getting this error:
Field "NoName" doesn't exist in destination table xxxx

The first row in the CSV has the table headings matching.

I was wondering could anyone suggest a solution to this?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Can you copy/paste your entire first row (header row) here?
 
Upvote 0
Hi Joe, thanks for your answer.

It's a very simple design, here is the first row:


IDField2trafficround
That's:
ID
Field2
traffic
round

Thanks again.
 
Upvote 0
That is not what a CSV file looks like (don't open it in Excel, that won't give you the true structure of the CSV file).

Can you open the file in a Text Editor (like NotePad), and copy paste the ENTIRE first row?
If should look something like this:
Rich (BB code):
ID,Field2,traffic,round,etc,...
 
Upvote 0
You may want to check to see if you have data past the last column in one of the rows (opening in Excel might be helpful is trying to more easily find that).
If you open the file in Excel, and hit CTRL+END, what cell does it go to?
Is it past the last column with headers in row 1?
 
Upvote 0
Really weird... today I ran the macro in Excel and everything worked perfectly!

I am thinking the issue might be something to do with the input data to the text file:

When the macro worked:
- Data came from a simple txt file in Notepad

When the macro did not work:
- Date came from CSV that was not extracted from zip file, just straight opened in Excel...

Here's the first row of the CSV in Notepad, with one line of sample data:

ID,Field2,traffic,round
,000freewebhost.com,44889,NR

I did the CTRL+END and it went to the correct place... though that was the sheet that worked.

Best regards,
-
 
Upvote 0
Really weird... today I ran the macro in Excel and everything worked perfectly!

I am thinking the issue might be something to do with the input data to the text file:

When the macro worked:
- Data came from a simple txt file in Notepad

When the macro did not work:
- Date came from CSV that was not extracted from zip file, just straight opened in Excel...

Here's the first row of the CSV in Notepad, with one line of sample data:

ID,Field2,traffic,round
,000freewebhost.com,44889,NR

I did the CTRL+END and it went to the correct place... though that was the sheet that worked.

Best regards,
-
Glad it is working for you now.

If I can offer one piece of advice, you typically never want to open a CSV file in Excel if you want to see what is really there, as Excel will do its own conversions to the data (i.e. drop leading zeroes) and try to "guess" at the data types (and often guesses wrong). One of my biggest Microsoft pet peeves is that they default Excel to be the default program to open CSV files, which is a horrible idea (because of the aforementioned reasons).

I always recommend opening text files in a text editor like NotePad, if you really want to see what the data really looks like (before Excel conversions).
Upon that default setting is one of the first things I do every time I get a new computer.
 
Upvote 0
Hi Joe, I have to run the report again tomorrow ... I will open the CSV file in Wordpad and then copy from there to Excel to run the macro.

Thanks for your advice.
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,525
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top