Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


export memo field

export memo field

export memo field

I need to export a database to a .csv file; it includes two memo fields. I've tried "copy to... deli", and "list" with a user function to add the quotes and commas, but carriage returns in the memo fields seem to cause problems... it wants to create a new record in the .csv file when a CR is encountered. How can I accomplish this??!

RE: export memo field


A CSV file tends to work on the basis that there is one record per line - and a carriage return qualifies as a line break, so your memo field are going to need a little stroking to get them just so.

Before you export your data, replace all the memo's with something like this:


replace all myMemoFld with StrTran(myMemoFld,CHR(13)+CHR(10),"\n\r")

Assuming that you are confident there are no \n\r entries in the memos already!


Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: export memo field

Thanks, I was afraid I'd have to do something like that. But, I thought enclosing the whole memo field in quotes would take care of the problem. Evidently it doesn't.

Since I'm importing the memo fields into another database, I assume I'd need to replace the \n\r with chr(10) and chr(13) once it's imported...


RE: export memo field

You might need to be a bit more sophisticated and look for \n\r and replace that with something... you follow I'm sure.

But yes.

And watch for lines that just end with a chr(13) or a chr(10)!


Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close