Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access 97: Export table to TAB delimited file

Posted on 2010-09-10
3
Medium Priority
?
413 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 40

Accepted Solution

by:
als315 earned 1600 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 93

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 400 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

972 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