By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,392 Members | 1,561 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,392 IT Pros & Developers. It's quick & easy.

docmd.transfertext don't works!

PEB
Expert 100+
P: 1,418
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
Share this Question
Share on Google+
14 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
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
Expert 100+
P: 1,418
PEB
Hi Mary,
Sure that my HDD is divided to C and D partitions :)
Nov 22 '06 #3

NeoPa
Expert Mod 15k+
P: 31,661
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
Expert Mod 10K+
P: 14,534
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
Expert 100+
P: 1,418
PEB
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
Expert 100+
P: 1,418
PEB
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

P: 3
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
Expert Mod 15k+
P: 31,661
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

P: 3
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
Expert Mod 15k+
P: 31,661
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

P: 3
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
Expert Mod 15k+
P: 31,661
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

P: 1
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
100+
P: 298
pod
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.