Removing Carriage Returns from Memo Fields

S

SheldonMopes

How can I remove carriage returns from a memo field ?
I am using DDE and macros to write a form into another application,
but the carriage returns cause the memo data to be written only up to
the point of the carriage return, then the cursor gets moved into the
next field (as if Enter was pressed). Thanks for your help.
 
J

John Vinson

How can I remove carriage returns from a memo field ?
I am using DDE and macros to write a form into another application,
but the carriage returns cause the memo data to be written only up to
the point of the carriage return, then the cursor gets moved into the
next field (as if Enter was pressed). Thanks for your help.

You can permanently remove them using the Replace() function. Run an
Update query updating the field to

Replace([memofieldname], Chr(13) & Chr(10), " ")

to replace all new-line pairs with a single blank.

You can also use this as a calculated field in a query and export from
the query, if you don't want to change your table data.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top