469,579 Members | 1,112 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,579 developers. It's quick & easy.

docmd.transfertext don't works!

PEB
1,418 Expert 1GB
Hi all,

Yesterday i've tried this command:

DoCmd.TransferText acExportDelim, "Comma_SEP", "myquery", "D:\Temp\Temp.txt"

And it gave me an Error that can't find "D:\Temp\Temp.txt"

This file exists ant i've supposed that should be replaced by new one!

But the transfer was'nt executed!

I've tried using Macro, but the same pb appears!

This is not urgent, coz i've found a solution! Just like a bug in Access!
Nov 22 '06 #1
14 8610
MMcCarthy
14,534 Expert Mod 8TB
Hey Vladi

If you're D:\ drive is a peripheral drive like CD drive. It may not be able to write to it directly.
Mary

Hi all,

Yesterday i've tried this command:

DoCmd.TransferText acExportDelim, "Comma_SEP", "myquery", "D:\Temp\Temp.txt"

And it gave me an Error that can't find "D:\Temp\Temp.txt"

This file exists ant i've supposed that should be replaced by new one!

But the transfer was'nt executed!

I've tried using Macro, but the same pb appears!

This is not urgent, coz i've found a solution! Just like a bug in Access!
Nov 22 '06 #2
PEB
1,418 Expert 1GB
Hi Mary,
Sure that my HDD is divided to C and D partitions :)
Nov 22 '06 #3
NeoPa
32,198 Expert Mod 16PB
Is the file locked elsewhere.
Perhaps you had it open in another application at the time?
Otherwise I don't know.
Nov 22 '06 #4
MMcCarthy
14,534 Expert Mod 8TB
Hi Mary,
Sure that my HDD is divided to C and D partitions :)
Try changing the filename and see will it create a new file?
Nov 22 '06 #5
PEB
1,418 Expert 1GB
Is the file locked elsewhere.
Perhaps you had it open in another application at the time?
Otherwise I don't know.
Unfortunately no! It isn't locked... And sometimes it isn't created yet! :(
Nov 25 '06 #6
PEB
1,418 Expert 1GB
Try changing the filename and see will it create a new file?
This gives the same pb!

I know that this kind of functions are null... I've right to develop my own way to export csv!

:)

Don't worry more about it... This is no more as problem for me... I've solved it! But wanted to note it like a bug in Access!

Thanks you both!

Vlady
Nov 25 '06 #7
Hi,
Could you tell us how you solved it please?

I have a similar problem. Access db converted from 97 to 2003.
Now macro falls over with 3027 error on TransferText command.
However, can manually export with no problem!

I think it is a bug too....
Dec 11 '06 #8
NeoPa
32,198 Expert Mod 16PB
To check if something is an Access bug visit (Welcome to Allen Browne's tips for Microsoft Access).
The part of the page you want is sub-titled "Flaws in Access".
Dec 11 '06 #9
OK, thanks, I've looked and can't see it there so I guess it is not a recognized bug except by me and Vlady....
Dec 11 '06 #10
NeoPa
32,198 Expert Mod 16PB
OK, thanks, I've looked and can't see it there so I guess it is not a recognized bug except by me and Vlady....
Sometimes, things can be confusing and don't work the way you expect them to. This doesn't necessarily mean they're a bug. That site can give more information about gotchas as well as just the bugs.
Dec 11 '06 #11
Thanks, I've bookmarked that page for future reference.

Further investigation elsewhere has led me to the solution for my problem (though maybe not Valdy's problem). I was using a .FIL file extension (legacy reasons) whereas from 2000 onwards it expects "valid" file extensions. Changed it to .TXT and it worked a treat!
Dec 11 '06 #12
NeoPa
32,198 Expert Mod 16PB
Yeah, that's a bit naff I know.
I normally use the Name statement afterwards to rename it to what I need (With On Error etc).
Dec 11 '06 #13
SOLVED: I had the same issue. In my case the Export Spec was invalid. I'd created it when exporting a table but then used it on a query (slightly different fields). As soon as I recreate the export spec it work as expected.
Sep 28 '07 #14
pod
298 100+
instead of a file, create the specification in the import wizard and save it as a name which you will then call from the specificationame in your docmd.transfertext call
Nov 9 '07 #15

Post your reply

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

Similar topics

reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.