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 / March 2006

Tip: Looking for answers? Try searching our database.

Access 97 Query to a tab delimited file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick - 29 Mar 2006 17:26 GMT
I am trying to programatically export the results of a query to a tab
delimited file.  I have done this comma delimited by simply building a string
then using the PRINT command to write the string to the file.  

How can I do something like this to ensure that the file is TAB delimited or
is their and easier way to do this??  

I have to include field headings as well, I am not sure if this would matter.

Thanks!
John Nurick - 29 Mar 2006 18:42 GMT
Normally one can use DoCmd.TransferText to export a query to a text
file. The default format is CSV, but you can use an export specification
(or a schema.ini file) to specify tab-delimited.

To create the export specification, export the query once manually
(File|Export), click the Advanced button in the wizard, and take it from
there.

Or if you're happy using Open, Print # and so on, you can write a
tab-delimited line by doing something like this

    Print #1, Field1 & vbTab & Field2 & vbTab & ... & FieldN

>I am trying to programatically export the results of a query to a tab
>delimited file.  I have done this comma delimited by simply building a string
[quoted text clipped - 6 lines]
>
>Thanks!

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
Rick - 29 Mar 2006 19:02 GMT
I don't know if it is my version or not (I am using Access 97) but I have no
Advanced button when I manually select File|export.  

I have "OK" or "Cancel"  then can select "WIthin the current database" or
"To an external file or database"  

If I select external I can change the file type.  But I never get an
advanced tab.  I do when I import, and have created and used import specs in
this way.

There are a lot of fields, I wish I could just use a spec.  I searched High
and low to try to find a way to do that before I posted.  

Thanks for the info though.  Maybe I am doing something wrong.  Might just
be that I am using the wrong version of access.

> To create the export specification, export the query once manually
> (File|Export), click the Advanced button in the wizard, and take it from
[quoted text clipped - 15 lines]
>
> Please respond in the newgroup and not by email.
John Nurick - 29 Mar 2006 20:22 GMT
Access 97's Export Text Wizard certainly has an Advanced button: I've
just clicked it. But you don't get the wizard if you select Save
Formatted in the preceding dialog, the one where you specify the file
type and name.

Which version (service release) do you have? Mine is SR-2.

>I don't know if it is my version or not (I am using Access 97) but I have no
>Advanced button when I manually select File|export.  
[quoted text clipped - 31 lines]
>>
>> Please respond in the newgroup and not by email.

--
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.