Exporting data via VBA?

  • Thread starter Thread starter Patrick
  • Start date Start date
P

Patrick

HI!!!
I want to know if the following scenario can be done
programmatically!
Here goes:
I open a table(i.e. clients) and select: File -> Export..
I choose to export in the '.txt' format all the
information included in the presently open table. And Save-
it as '911List.txt'. I want the text as : delimited with
coma's.
And text qualifier as "". Then: Export to 'Desktop'.

This code would be placed in the 'click event' of a button.

Hope I didn't forget anything...
Can this be done entirely from VBA.

Thanks in advance for any help you can provide-me with!
PAtrick
 
I want to know if the following scenario can be done

Here goes:
I open a table(i.e. clients) and select: File -> Export..
I choose to export in the '.txt' format all the
information included in the presently open table. And Save-
it as '911List.txt'. I want the text as : delimited with

And text qualifier as "". Then: Export to 'Desktop'.

This code would be placed in the 'click event' of a button.

Hope I didn't forget anything...
Can this be done entirely from VBA.

Thanks in advance for any help you can provide-me with!

hi patrick,

you meant to export data that's stored in tables in an access database into
a txt.file with specific formattings ?

sure it's possible... i did that a couple of times.

just contact me in case you want more information or more help :) it's way
too much to post it here.

Joe.
 
Sure. Pretty easy.

Look up the TransferText Method of the DoCmd object in the help file.

--

Sco

M.L. "Sco" Scofield, MCSD, MCP, MSS, Access MVP, A+
Useful Metric Conversion #16 of 19: 2 monograms = 1 diagram
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 
Back
Top