Solved

Access 97: Export table to TAB delimited file

Posted on 2010-09-10
3
356 Views
Last Modified: 2013-11-28
I have a table with these fields:
email, payment_amount, currency

I need to output each record into a TAB delimited TEXT file. It seems Access97 only outputs into a Comma delimited text file.

I am sure this is easy to do...I am busy with other coding!

VB code please.

High points for a speedy solution!
:)
0
Comment
Question by:SOTA
3 Comments
 
LVL 39

Accepted Solution

by:
als315 earned 400 total points
ID: 33646479
path - is file name with path, tblname - source table name
Function TextStreamTest(path As String, tblname As String)
    Dim dbs As Database
    Dim TXT As String
    Dim rst As Recordset, l As Long
    Set dbs = CurrentDb
    Set rst = dbs.OpenRecordset(tblname)
    Open path For Output As #1
    l = rst.RecordCount
    Do While l > 0
        TXT = rst![Field1] & chr(8) & rst![Field2] & chr(8) & rst![Field3]
        Print #1, TXT
        l = l - 1
        rst.MoveNext
    Loop
    rst.Close
    Close #1
End Function
0
 
LVL 92

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 100 total points
ID: 33646485
SOTA,

Have you tried creating a specification that declares the tab as the delimiter?

Patrick
0
 

Author Closing Comment

by:SOTA
ID: 33649515
Sweet!
Thanks for the 2 comments!!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now