5 lines in field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am importing an excel spreadsheet into Access and have a form created to
display info. below is the info in one field or cell. how can I get it to
display in 5 lines vs all run on without control? thank you


QFL - 1-800-423-8904
HRA – abc.com
HLP - abc.com
SU - Stepup.abc.com
HW - abc.com
 
Does it have line breaks in Excel? If so, do they show up as little
square boxes in the Access textbox?

If so, use the VBA Replace() function in an update query to replace
Chr(10)
with
Chr(13) & Chr(10)
 
I don't understand. Will that make it display in five rows. If there
anything to put at the beginning of a new row that lets it know that it is a
new row?
 
I don't understand either.

The only way I can imagine getting this
QFL - 1-800-423-8904
HRA – abc.com
HLP - abc.com
SU - Stepup.abc.com
HW - abc.com

in an Excel cell is to have a linebreak (Alt+Enter, in Excel) between
each line.

When imported into an Access table and displayed in a textbox on an
Access form, the Excel linebreaks (which consist of the character LF,
i.e. Chr(10)) show up as little rectangles, not as linebreaks. This is
because a linebreak in an Access textbox must consist of the two
characters CR LF, i.e. Chr(13) & Chr(10).

Please can you explain more carefully.
 
I understand up to the point of the ch10 and ch13....I don't know where to
put that to use it
 
As I said in my first message,
use the VBA Replace() function in an update query to replace
Chr(10)
with
Chr(13) & Chr(10)

Make sure you have a backup copy of your database in case of
misunderstandings.

Then create an update query. Select the field. I don't know it's name,
so I'll call it XXX. Then in the Update To row, put
Replace([XXX], Chr(10), Chr(10) & Chr(13))

Finally, cross your fingers and run the query!
 
I believe John meant

Replace([XXX], Chr(10), Chr(13) & Chr(10))

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


John Nurick said:
As I said in my first message,
use the VBA Replace() function in an update query to replace
Chr(10)
with
Chr(13) & Chr(10)

Make sure you have a backup copy of your database in case of
misunderstandings.

Then create an update query. Select the field. I don't know it's name,
so I'll call it XXX. Then in the Update To row, put
Replace([XXX], Chr(10), Chr(10) & Chr(13))

Finally, cross your fingers and run the query!



I understand up to the point of the ch10 and ch13....I don't know where to
put that to use it
 
Back
Top