Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type conversion failaure on import to text type field

Status
Not open for further replies.

kpal29

Technical User
Feb 8, 2003
147
DK
I have a table w/ field 'Invoice_Number'. The type is 'text'.

I am importing a text file in which this field contains both letters and numbers as values and some are just numbers.

Why am I getting a type conversion failure, shouldn't access simply treat the numbers as text?
 
One way to achieve this is to append your data to an existing table with fields pre-defined as you need them.
 
Hi kpal,

I'll betcha that the very first line 'Invoice-Number' in your text-file is composed of numbers only - no?

Access uses the FIRST line (record) to determine the data-type for the rest of the records.
It therefore assumes that that particular field is numeric (int, long-int etc).

As soon as it comes across an alpha-numeric value - it kicks off.

Just to test this, add an alphabetic character to the Invoice-Number in the first line.

Regards,

Darrylle




Never argue with an idiot, he'll bring you down to his level - then beat you with experience. darrylles@yahoo.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top