Results 1 to 4 of 4
  1. #1
    mindbender is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2013
    Posts
    283

    Exporting table into separate semicolon separated text files

    Hi All,



    I have a table that contains 2 columns; name, account, email.

    I am wondering if it is possible to export a separate semicolon separated text file that only includes the email address and name it name-account.txt

    example

    agent1 busco pres@busco.com
    agent1 busco cfo@busco.com
    agent2 inccorp pres@inccorp.com
    agent2 inccorp cfo@inccorp.com

    would create 2 text files at would look like this:

    agent1-busco.txt when opened it would contain pres.busco.com;cfo@busco.com

    agent2-inccorp.txt when opened it would contain pres@inccorp.com;cfo@inccorp.com

    Is this possible?

    Thanks in advance

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    Is this possible?
    yes - go to the external data tab, select text and follow the prompts, one of them enables you to select the ; character as field deliminator

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Assuming you want to do that in VBA you need to create a new query and concatenate them using Allen's code (www.allenbrowne.com/func-concat.html) or the free sample from my site (http://forestbyte.com/vba-code-samples/ look for JoinFromArray) then you simply loop through that queries recordset and use Docmd.TransferText acExportDelim to create your csv files for each agent.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    mindbender is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2013
    Posts
    283
    Quote Originally Posted by Gicu View Post
    Assuming you want to do that in VBA you need to create a new query and concatenate them using Allen's code (www.allenbrowne.com/func-concat.html) or the free sample from my site (http://forestbyte.com/vba-code-samples/ look for JoinFromArray) then you simply loop through that queries recordset and use Docmd.TransferText acExportDelim to create your csv files for each agent.

    Cheers,

    Thank you very much. I will go through this and see how I make out.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. exporting multiple text files
    By Jfougerousse in forum Import/Export Data
    Replies: 1
    Last Post: 06-09-2018, 02:27 AM
  2. Replies: 3
    Last Post: 10-24-2017, 07:54 AM
  3. exporting query to text comma separated
    By Pasi in forum Queries
    Replies: 6
    Last Post: 12-27-2013, 06:42 PM
  4. Replies: 3
    Last Post: 01-31-2013, 01:03 PM
  5. Replies: 1
    Last Post: 08-23-2011, 03:51 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums