• I am creating a new home page for this site, where the focus will be on directing people to the forums. If you would like to provide a testimonial, I would be most grateful. The thread where this is discussed can be found here: Seeking Testimonials Alternatively, just private message me.

TransferText .CSV format (1 Viewer)

Leo_Polla_Psemata

Registered User.
Local time
Today, 09:33
Joined
Mar 24, 2014
Messages
212
Hi ,
I have a simple query and I want to export it in excel, Coma Separated Value., .CSV

I tried to run DoCmd.TransferText but all of my attempts were futile.

Is there any idea about it ?

Thanks



Edit

I found it, I must export it as TXT and file suffix insert .csv instead of .txt and it works

Now, does anyone know if I can execute this "Saved Exports" through a macro or docmd ?



Another edit, i insert a picture just to make it more clear.
Can I run this "Saved Exports" through a macro or docmd ?

[img=http://s16.postimg.org/fhfuqxm5d/Untitled.jpg]
 
Last edited:

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 17:33
Joined
Sep 12, 2006
Messages
13,892
that isn't right.

you can export either as fixed width, or as comma separated. you can give the resulting file any name you like.

the various arguments in the docmd.transfertext command specify how the resultant file is structured. you can use a specification file instead if you prefer.

In your code (eg as a result of a button click)
docmd.transfertext etc
 

Leo_Polla_Psemata

Registered User.
Local time
Today, 09:33
Joined
Mar 24, 2014
Messages
212
The problem is that the "specification file" does not include field name on first row.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 17:33
Joined
Sep 12, 2006
Messages
13,892
there is a check box for that on the specification.
 

Leo_Polla_Psemata

Registered User.
Local time
Today, 09:33
Joined
Mar 24, 2014
Messages
212
The check box, yes, but it doesn't keep the field name in the specifications and the csv is without field name on first row

 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom