Export to Text File with newline delimiter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jim

    Export to Text File with newline delimiter

    Hi All,

    I need to export a query to a text file but i need each field delimited
    by a new line. Cant seem to find a way to do it.

    any ideas..

    thanks

    jim
  • Mark

    #2
    Re: Export to Text File with newline delimiter

    Jim,

    Could you clarify what you mean by "each field delimited by a new line".
    Does the query return multiple records?

    Steve


    "jim" <jim@blahblah.b lahwrote in message
    news:4_ednYVL_d hqs_zVnZ2dnUVZ8 qPinZ2d@posted. metronet...
    Hi All,
    >
    I need to export a query to a text file but i need each field delimited by
    a new line. Cant seem to find a way to do it.
    >
    any ideas..
    >
    thanks
    >
    jim

    Comment

    • jim

      #3
      Re: Export to Text File with newline delimiter

      Hi Steve,

      Thanks for the reply... i have a table with username and email addresses
      and i wish to output it as follows:

      username1
      email1

      username2
      email2

      username3
      email3

      rather than:
      username1, email1
      username2, email2
      username3, email3


      cant seem to find a way to do it.... any ideas appreciated..

      cheers

      jim


      Mark wrote:
      Jim,
      >
      Could you clarify what you mean by "each field delimited by a new line".
      Does the query return multiple records?
      >
      Steve
      >
      >
      "jim" <jim@blahblah.b lahwrote in message
      news:4_ednYVL_d hqs_zVnZ2dnUVZ8 qPinZ2d@posted. metronet...
      >Hi All,
      >>
      >I need to export a query to a text file but i need each field delimited by
      >a new line. Cant seem to find a way to do it.
      >>
      >any ideas..
      >>
      >thanks
      >>
      >jim
      >
      >

      Comment

      • Mark

        #4
        Re: Export to Text File with newline delimiter

        Hi Jim,

        Try the following:

        Dim DB As DAO.Database
        Dim Rst As Recordset
        Set DB = CurrentDB()
        Set Rst = DB.OpenRecordse t("NameOfYourTa ble")
        Open "C:\TESTFILE.Tx t" For Output As #1
        Do Until Rst.EOF
        Print #1, Rst!UserName
        Print #1, Rst!Email
        Print #1, ""
        Rst.MoveNext
        Loop
        Close #1
        Set DB = Nothing
        Rst.Close
        Set Rst = Nothing

        Notes ....

        1. In the line Open "C:\TESTFILE.Tx t" For Output As #1, Change
        C:\TESTFILE.Txt to wherever you wantto store your text data.
        2. In the two lines, Print #1, Rst!UserName and Print #1, Rst!Email, be
        sure to use the actual field names in your table

        I provide users a resource for help with Access, Excel and Word
        applications. My fees ar very reasonable. If you ever need help beyond what
        a newsgroup can provide, please contact me at rlaird@penn.com.

        Steve

        "jim" <jim@blahblah.b lahwrote in message
        news:fPidnT8VTO DNn_nVnZ2dnUVZ8 vCdnZ2d@posted. metronet...
        Hi Steve,
        >
        Thanks for the reply... i have a table with username and email addresses
        and i wish to output it as follows:
        >
        username1
        email1
        >
        username2
        email2
        >
        username3
        email3
        >
        rather than:
        username1, email1
        username2, email2
        username3, email3
        >
        >
        cant seem to find a way to do it.... any ideas appreciated..
        >
        cheers
        >
        jim
        >
        >
        Mark wrote:
        >Jim,
        >>
        >Could you clarify what you mean by "each field delimited by a new line".
        >Does the query return multiple records?
        >>
        >Steve
        >>
        >>
        >"jim" <jim@blahblah.b lahwrote in message
        >news:4_ednYVL_ dhqs_zVnZ2dnUVZ 8qPinZ2d@posted .metronet...
        >>Hi All,
        >>>
        >>I need to export a query to a text file but i need each field delimited
        >>by a new line. Cant seem to find a way to do it.
        >>>
        >>any ideas..
        >>>
        >>thanks
        >>>
        >>jim
        >>

        Comment

        • John Marshall, MVP

          #5
          Is solicitating condoned in CDMA?

          "Mark" <notmy@email.co mwrote in message
          news:G_mdnfQjW6 EvHPjVnZ2dnUVZ_ uGdnZ2d@earthli nk.com...
          I provide users a resource for help with Access, Excel and Word
          applications. My fees ar very reasonable. If you ever need help beyond
          what a newsgroup can provide, please contact me at rlaird@penn.com.
          >
          Steve

          Comment

          • Bob Quintal

            #6
            The Pretty Crappy Developer is Baaaackkkk!!!

            "Mark" <notmy@email.co m>
            rlaird@penn.com.
            Steve

            What's worse is that he's showing his multiple personalities.

            --
            Bob Quintal

            PA is y I've altered my email address.
            ** Posted from http://www.teranews.com **

            Comment

            • Tom van Stiphout

              #7
              Re: Is solicitating condoned in CDMA?

              On Fri, 27 Jun 2008 20:37:10 -0400, "John Marshall, MVP"
              <lancucki@stone henge.cawrote:

              Per the newsgroup charter posted here:

              it is not.
              A certain Steve can't be bothered with that. That's why we shun him.

              -Tom.


              >"Mark" <notmy@email.co mwrote in message
              >news:G_mdnfQjW 6EvHPjVnZ2dnUVZ _uGdnZ2d@earthl ink.com...
              >
              >I provide users a resource for help with Access, Excel and Word
              >applications . My fees ar very reasonable. If you ever need help beyond
              >what a newsgroup can provide, please contact me at rlaird@penn.com.
              >>
              >Steve

              Comment

              • Tony Toews [MVP]

                #8
                Re: Export to Text File with newline delimiter

                "Mark" <notmy@email.co mwrote
                :
                >I provide users a resource for help with Access, Excel and Word
                >applications . My fees ar very reasonable. If you ever need help beyond what
                >a newsgroup can provide, please contact me at rlaird@penn.com.
                Steve

                Soliciting for customers here too. Shame on you.

                Tony
                --
                Tony Toews, Microsoft Access MVP
                Please respond only in the newsgroups so that others can
                read the entire thread of messages.
                Microsoft Access Links, Hints, Tips & Accounting Systems at

                Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

                Comment

                • StopThisAdvertising

                  #9
                  Re: Export to Text File with newline delimiter


                  "Mark" <notmy@email.co mschreef in bericht news:G_mdnfQjW6 EvHPjVnZ2dnUVZ_ uGdnZ2d@earthli nk.com...
                  Hi Jim,

                  I provide users a resource for help with Access, Excel and Word
                  applications. My fees ar very reasonable. If you ever need help beyond what
                  a newsgroup can provide, please contact me at rlaird@penn.com.

                  Steve

                  --
                  ARRRGGGHHHHHHHH !!!!!!!!
                  --

                  (Earthlink kicked him out ?? SuperNews also ?? ==updated 'abuse-reporting')
                  Until now 5750+ pageloads, 3600+ first-time visitors (these figures are *real* and rapidly increasing)

                  *************** *************** ***
                  If anyone wants to help us getting rid of Steve (at least for a while) again ??
                  abuse@giganews. com (appropriate action will follow when there are enough complaints)
                  *************** *************** ***

                  Arno R

                  Comment

                  • Arno R

                    #10
                    Re: The Pretty Crappy Developer is Baaaackkkk!!!


                    "Bob Quintal" <rquintal@sPAmp atico.caschreef in bericht news:Xns9ACADCB 4C8E32BQuintal@ 66.175.223.2...
                    "Mark" <notmy@email.co m
                    rlaird@penn.com.
                    Steve

                    What's worse is that he's showing his multiple personalities.

                    --
                    Bob Quintal

                    PA is y I've altered my email address.
                    ** Posted from http://www.teranews.com **

                    He is showing his new ISP also: GigaNews.


                    (Earthlink kicked him out ?? SuperNews also ?? ==updated 'abuse-reporting')

                    *************** *************** ***
                    If anyone wants to help us getting rid of Steve (at least for a while) again ??
                    abuse@giganews. com (appropriate action will follow when there are enough complaints)
                    *************** *************** ***

                    Arno R

                    Comment

                    • Keith Wilby

                      #11
                      Re: Export to Text File with newline delimiter

                      "Mark" <notmy@email.co mwrote in message
                      news:G_mdnfQjW6 EvHPjVnZ2dnUVZ_ uGdnZ2d@earthli nk.com...
                      >
                      If you ever need help beyond what a newsgroup can provide, please contact
                      me
                      Still an arrogant pr1ck then Steve? Still think you have more talent than
                      all of the experts on here put together?

                      Comment

                      • Michael Gramelspacher

                        #12
                        Re: Export to Text File with newline delimiter

                        In article <48720de1$1_1@g lkas0286.greenl nk.net>, here@there.com says...
                        "Mark" <notmy@email.co mwrote in message
                        news:G_mdnfQjW6 EvHPjVnZ2dnUVZ_ uGdnZ2d@earthli nk.com...

                        If you ever need help beyond what a newsgroup can provide, please contact
                        me
                        >
                        Still an arrogant pr1ck then Steve? Still think you have more talent than
                        all of the experts on here put together?
                        >
                        >
                        The quoted text does not imply that.

                        Comment

                        • Larry Linson

                          #13
                          Re: Export to Text File with newline delimiter


                          "Michael Gramelspacher" <gramelsp@psci. netwrote
                          If you ever need help beyond what a newsgroup can
                          provide, please contact me
                          >>
                          >Still an arrogant pr1ck then Steve? Still think you
                          >have more talent than all of the experts on here put
                          >together?
                          >>
                          The quoted text does not imply that.
                          It certainly does, Steve, but _your_ post tries to disguise that "Michael
                          Gramelspacher" is nothing more than another of Steve's sock-puppets posting
                          in support of itself. Buzz off, Michael/Mark/Steve/et al.

                          Larry Linson
                          Microsoft Office Access MVP


                          Comment

                          • Keith Wilby

                            #14
                            Re: Export to Text File with newline delimiter

                            "Michael Gramelspacher" <gramelsp@psci. netwrote in message
                            news:MPG.22dbe3 0d770859f898968 4@news.psci.net ...
                            In article <48720de1$1_1@g lkas0286.greenl nk.net>, here@there.com says...
                            >"Mark" <notmy@email.co mwrote in message
                            >news:G_mdnfQjW 6EvHPjVnZ2dnUVZ _uGdnZ2d@earthl ink.com...
                            >
                            If you ever need help beyond what a newsgroup can provide, please
                            contact
                            me
                            >>
                            >Still an arrogant pr1ck then Steve? Still think you have more talent
                            >than
                            >all of the experts on here put together?
                            >>
                            >>
                            The quoted text does not imply that.
                            You're right, how foolish of me. It doesn't imply it at all, it states it
                            as hard fact in plain text for all but a complete idiot to see, "Michael".

                            Comment

                            • Michael Gramelspacher

                              #15
                              Re: Export to Text File with newline delimiter

                              In article <48731506$1_1@g lkas0286.greenl nk.net>, here@there.com says...
                              "Michael Gramelspacher" <gramelsp@psci. netwrote in message
                              news:MPG.22dbe3 0d770859f898968 4@news.psci.net ...
                              In article <48720de1$1_1@g lkas0286.greenl nk.net>, here@there.com says...
                              "Mark" <notmy@email.co mwrote in message
                              news:G_mdnfQjW6 EvHPjVnZ2dnUVZ_ uGdnZ2d@earthli nk.com...

                              If you ever need help beyond what a newsgroup can provide, please
                              contact
                              me
                              >
                              Still an arrogant pr1ck then Steve? Still think you have more talent
                              than
                              all of the experts on here put together?
                              >
                              >
                              The quoted text does not imply that.
                              >
                              You're right, how foolish of me. It doesn't imply it at all, it states it
                              as hard fact in plain text for all but a complete idiot to see, "Michael".
                              >
                              >
                              It seems that people who do not agree with you are by definition idiots,
                              so I do not see any way to evade the charge. Not that it really matters
                              anyway though, does it, Keith.

                              Comment

                              Working...