Solved

Access 97: Export table to TAB delimited file

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

914 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

21 Experts available now in Live!

Get 1:1 Help Now