when I use TransferText from Access table to .txt file, data format is changed

lhanes72

Registered User.
Local time
Today, 16:45
Joined
Dec 2, 2008
Messages
31
Although the table I am exporting to a .txt file has all fields set up as text data types, when it pulls into the .txt file it adds a ".0" to the end of the cield. Does something in the Export specs need to change, because nothing I nothing I have changed on it seems to help. :confused:
 
Try exporting a query instead of the table and format the field, in the query, the way you want it to come out.
 
I've tried using a query; but I must be using the wrong verbage. What I have is 7 sometimes 8 numeric text characters in a field 9 characters long. What it's doing is taking 1202011 and making it 1202011.0. I've tried using Format([Field], "General Number") but that doesn't fix it because I thought general numbers do not require the decimal like a fixed or standard number does. What should I use?
 
Try this:

Format([Field],"##0000000")

The ## means optional so if you don't have them it won't include them and the 0 is necessary so if you had a number of 1201 it would bring back 0001201. But it should leave off the decimal.
 
When I tab out of the field in the query, the "##" disappear.

The CLng conversion didn't work either.
 
What's the datatype in the table set to? And what is the decimal places in the table set to?
 
The datatype is set to Text. There is no property for decimals.
 
Why are you storing it as text if it is a number? Why not store it as Long Integer?
 
Was able to figure out what was causing the problem to occur. The primary table resided on a database that only I use. It was being imported to a local database. The specs were created in my database. When we created the specs in the local database, the export worked when I used the "##0000000" format technique. Thanks very much for your help. That will be useful information in the future as well, I'm sure.
 

Users who are viewing this thread

Back
Top Bottom