Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / May 2004

Tip: Looking for answers? Try searching our database.

Exporting to a .txt file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Craig - 28 May 2004 18:40 GMT
I'm using Access 97.  I'm trying to export a table to
a .txt file and getting an error message.  It doesn't like
the "text(*.txt)" line in the following statement:

DoCmd.OutputTo , "MyTable", "text(*.txt)", , False

What I like about the 'OutputTo' method is that Excel will
prompt the user with a 'Save As' dialog box so the user
can decide what to name the file and where to save it.  I
don't think the "TransferText" method allows this, or does
it??

Thanks.
John Nurick - 28 May 2004 21:01 GMT
If you look in Help you'll find that the OutputFormat parameter is an
AcFormat constant, not a string description. Use AcFormatText. If you
omit the filename you'll get a Save As dialog.

But OutputTo has limitations compared with TransferText. Yes, you have
to pass the latter a filename; but you can use the code at
http://www.mvps.org/access/api/api0001.htm to display the File Save
dialog and get the filename from the user.

>I'm using Access 97.  I'm trying to export a table to
>a .txt file and getting an error message.  It doesn't like
[quoted text clipped - 9 lines]
>
>Thanks.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.