Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Sep 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Export CSV (Access 97)

    Hi

    I have a query that I wish to export in CSV format. The problem is that a string field may contain a comma or apostrophe and this can cause problems when exporting to CSV format. I was thinking of removing such characters from the field, but can not think of an easy way to do this.

    Can anyone help, or suggest a better workaround for this problem.

    Thanks & Regards

    Warren

    PS Using other export formats probably won't help as the export file is imported into another programme, which is very sensitive to these characters and therefore causes import errors.

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Export CSV (Access 97)

    You will probably have to end up writing some code to find the comma and/or apostrophe and delete it accordingly. This code would be a module that could be addressed by a query.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Export CSV (Access 97)

    Actually, as long as the data doesn't contain a quote mark you should be OK - Access by default (though you can change it) puts quotes around each field when you export to a delimited text format, which CSV is. You could go through the work of doing a make table from your query, doing a find to check for any commas or the single quote/apostrophe, but try the other route first. Hope this will work for you.
    Wendell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •