Line Break Icon

G

Guest

I am importing a field from excel that has multiple lines within each cell
separated by a line break (Alt+Enter). When I import the data into access, a
square box icon appears at each line break rather than an actual line break
and the contents of the field read in a continuous line. Is there any
systematic way to replace these icons with actual line breaks?

Thanks.
 
D

Dirk Goldgar

aisos12 said:
I am importing a field from excel that has multiple lines within each
cell separated by a line break (Alt+Enter). When I import the data
into access, a square box icon appears at each line break rather than
an actual line break and the contents of the field read in a
continuous line. Is there any systematic way to replace these icons
with actual line breaks?

Yes. After you've import the data, run an update query that replaces
the character Chr(10) -- the line-feed character, which Excel uses as a
line break -- with the character combination Chr(13) & Chr(10), which
Access uses as a line break. The SQL of such a query would be something
like this:

UPDATE YourImportedTable
SET [YourField] = Replace([YourField], Chr(10), Chr(13) & Chr(10));
 

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