Is it possible to Find and Replace paragraph spaces, carriage ret.

G

Guest

Data imported into my Access 2000 database from other applications includes
HTML break and paragraph return codes such as <BR> and <P>. All of these are
visible as text characters in Memo and Text fields, and can easily be deleted
using Find and Replace -- but I can't find a way to Replace them with the
correct Access control code for a paragraph break.

Shareware F&R programs warn of the dangers of replacing characters within
Word, Excel and Access files, mentioning the "binary" nature of these files
and the perils of altering the file length. I don't understand these terms,
and I'm looking for a reliable GUI solution for newbies.

Thanks,

PAGA
 
J

John Vinson

Data imported into my Access 2000 database from other applications includes
HTML break and paragraph return codes such as <BR> and <P>. All of these are
visible as text characters in Memo and Text fields, and can easily be deleted
using Find and Replace -- but I can't find a way to Replace them with the
correct Access control code for a paragraph break.

An Access Memo field (well, text fields too, but since they're limited
to 255 bytes they rarely need it) can contain the character sequence
carriage-return line-feed to force a new line in the field.
carriage-return is Chr(13), linefeed is Chr(10).

To take a memo field named MyMemo containing embedded <BR> and replace
all of them with these new lines, create an Update query based on the
table. On the Update To line of the Update query under MyMemo type

Replace([MyMemo], "<BR>", Chr(13) & Chr(10))

Run the Update query by clicking the ! icon, and it will do all the
replaces.

Note that you would be more than prudent to make a backup of the
database first.

John W. Vinson[MVP]
 
G

Guest

John,

This is very clear, and should save me several days of text editing --
thanks a bunch!

PAGA

John Vinson said:
Data imported into my Access 2000 database from other applications includes
HTML break and paragraph return codes such as <BR> and <P>. All of these are
visible as text characters in Memo and Text fields, and can easily be deleted
using Find and Replace -- but I can't find a way to Replace them with the
correct Access control code for a paragraph break.

An Access Memo field (well, text fields too, but since they're limited
to 255 bytes they rarely need it) can contain the character sequence
carriage-return line-feed to force a new line in the field.
carriage-return is Chr(13), linefeed is Chr(10).

To take a memo field named MyMemo containing embedded <BR> and replace
all of them with these new lines, create an Update query based on the
table. On the Update To line of the Update query under MyMemo type

Replace([MyMemo], "<BR>", Chr(13) & Chr(10))

Run the Update query by clicking the ! icon, and it will do all the
replaces.

Note that you would be more than prudent to make a backup of the
database first.

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