Q: docmd.transfertext without specname?

M

Mark

Hi,

I want to transfer a query to a textfile using the transfertext method, but
I don't want to create a spec name. Problem is the default delimiter is a
comma and I want to use a tab. I don't want to permanently change the default
delimiter.

Is there code to programmatically change the default delimiter temporarily,
or some other way to use the tab character instead of a comma?

Thanks!
-Mark
 
G

George Nicholson

Afaik, there is no provision to create your own spec other than the one you
don't want to use.

If you want to use a spec other than the default, you need to 1) create one,
2) give it a name and save it (its saved within the mdb file, not a separate
file) and 3) specify it in the appopriate argument of TransferText
 
M

Mark

Thanks for the response, George. It'd be nice if Microsoft would add that
functionality in. Basically the transfertext gives me just what I need except
for the choice of delimiter. I've read some articles saying you might be able
to change the reg settings, but that's something I don't want to get into.
 
D

Dale Fye

Why don't you want to create a spec?

The process is easy (took me all of about 15 seconds), and once it is done,
it is done. It stays with the db and you don't have to worry about it?
Changing the delimiter in an export spec does not change it permanently.

Dale
 
G

George Nicholson

It'd be nice if Microsoft would add that functionality in.

Um, they have. You just have a mental block against using it for some
reason...?

Creating a spec allows you to specify a ton of stuff that would be an
absolute nightmare to include as arguments to a vba method (and I find that
the spec wizard is a *lot* easier for non-coders to use/edit when file/data
specs change).

Now, you might consider a spec as being overkill for your needs at the
moment, but to say the functionality isn't there is just plain wrong.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top