Multiple lines in a field

B

Bobbye R

I have a field in a table called a Job Site. An example of a record I'm
having a problem with is as follows:

SR-099 MISSION SITE
SAN ELIJO INTERSECTION NE

When I look at the table in datasheet view only SR-099 MISSION SITE appears
even though I know the other info is there. I discovered that if I use the
right arrow SAN ELIJO INTERSECTION NE will appear. Apparently there is a
carriage return in the field. I need to find a way to remove it so that I
get

SR-099 MISSION SITE SAN ELIJO INTERSECTION NE

to show all at once on one line.
I have a fairly large database. This doesn't occur on all records I can't
tell when I'm not seeing all the info unless I go to each record individually
and right arrow on the field.
 
J

John W. Vinson

I need to find a way to remove it so that I
get

SR-099 MISSION SITE SAN ELIJO INTERSECTION NE

to show all at once on one line.

Well, you really shouldn't be looking at data in a table datasheet anyway. If
you view the data in a Form with a textbox big enough for two lines you'll see
all the data.

That said... run an Update Query updating the field [address] to

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

using your actual fieldname. This will replace all CrLf pairs with a single
blank.

John W. Vinson [MVP]
 
B

Bobbye R

I do use a form I was having the same problem of not seeing all the data
even though the textbox was fairly wide. I looked at the table in datasheet
view to try to figure out what was happening. I wasn't even aware that there
was a second line when I converted my data. I hit the right arrow by
accident and there it was. Thanks for the code. You gave me exactly what I
wanted.--

Access 2000 User, Thanks in advance Bobbye


John W. Vinson said:
I need to find a way to remove it so that I
get

SR-099 MISSION SITE SAN ELIJO INTERSECTION NE

to show all at once on one line.

Well, you really shouldn't be looking at data in a table datasheet anyway. If
you view the data in a Form with a textbox big enough for two lines you'll see
all the data.

That said... run an Update Query updating the field [address] to

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

using your actual fieldname. This will replace all CrLf pairs with a single
blank.

John W. Vinson [MVP]
 
J

John W. Vinson

I do use a form I was having the same problem of not seeing all the data
even though the textbox was fairly wide.

Doesn't matter how *wide* it is - what's needed is for the textbox to be
*taller* to see two lines.
I looked at the table in datasheet
view to try to figure out what was happening. I wasn't even aware that there
was a second line when I converted my data. I hit the right arrow by
accident and there it was. Thanks for the code. You gave me exactly what I
wanted.--

Glad to help!

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