Solved

Access 97: Export table to TAB delimited file

Posted on 2010-09-10
3
370 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

803 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