TransferText giving unwanted decimals

proben930

Registered User.
Local time
Today, 10:52
Joined
Mar 22, 2004
Messages
30
I have a transfertext line that looks like this:

DoCmd.TransferText acExportDelim, "BenSpec", "FilteredQuery", conpath & "Testfile.csv"

It transfers fine and how I want it expcept that two of the fields export with two decimals on the end. They are of the type 'number' with 0 decimals. Any ideas?
 
I tried using an alternate method on my query... I changed the field name to say format(field2,"0000000") [the number is 7 numbers, no decimals]. The query runs perfectly, and I can right click export and get exactly what i want. Problem is, when I run my code to transfertext, it gives me the following error message:
"Error 3011: MS Jet database engine could not find the object "Testfile.csv". Make sure the object exists and you spell its name and path name correctly"

This file is the name of the file I'm exporting too. How can I make it export the same as when I right click -> export? Thanks!
 
Anyone? :o
 

Users who are viewing this thread

Back
Top Bottom