Export from mdb to txt

Posted on 2009-12-23
Last Modified: 2012-05-08
I need to export multiple records from the database to a text file but the problem is that I need to have all the records printed on one line and not each on a single line.

Do While Not rst1.EOF
Print #sessfile, Format(Str(rst1!number), "000000")  ' & "000000" & invoice & "    "
In this case, each record is printed on a single line, but I need to have all the records on one line. (without CR or enter)
thank you
Question by:houssam_ballout
    LVL 8

    Expert Comment

    simply do a Replace(strname,vbcrlf,' ') on the exported string
    LVL 14

    Accepted Solution

    Or just place a seimcolon at the end of each Print # statement.
    LVL 17

    Author Comment

    This code will produce a carriage return (line feed), but I want all the records to be on one line. So when printing other records they will be next to the previous one and not on a new line.
    LVL 17

    Author Closing Comment

    The semi colon worked

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
    When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
    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…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    732 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

    23 Experts available now in Live!

    Get 1:1 Help Now