Text and Memo field concatenation - Line break (Access 2007)

J

Jim

I'm a new user to Access 2007 (starting today - former user of Access 2000
and 2003)

I need to create a Text or Memo field for which the records may contain
multiple different fonts. I am aware of the Rich Text property for Memo
fields (in 2007).

When I create a Memo fields that is Rich Text enabled and concatenate it
with another another Memo or Text field, the resulting Memo field has a line
break inserted between the joined fields.

If I concatenate a Memo field (Plain Text enabled) with another Memo or
Text, it does NOT insert the line break.

Any suggestions about how I can prevent the line break?
 
P

Pete D.

If you join these fields you need to know about how rich text is stored as
HTML. If you then display the text field and richtext memo field in a
richtext control you will get the return. If you change the display
control to text you will get the text of your non-rich text field and the
HTML of the Rich text field.

To do this without the return you need to remove the hidden html <DIV> in
the field.
=[YourTextBox] & " " & Right([MemoField1],Len([MemoField1])-5)
 
J

Jim

Thanks. Your reply suggests that I need to strip 5 characters from the
richtext memo.

Is the text string <DIV> stored at the beginning or the end of the HTML for
a richtext memo field? Is this consistent?

If I try to concatenate 2 richtext memos without the line break, is the
command:

Right([MemoField1],Len([MemoField1])-5) & " " &
Right([MemoField2],Len([MemoField2])-5)

or is it:

Left([MemoField1],Len([MemoField1])-5) & " " &
Left([MemoField2],Len([MemoField2])-5)

--
Jim


Pete D. said:
If you join these fields you need to know about how rich text is stored as
HTML. If you then display the text field and richtext memo field in a
richtext control you will get the return. If you change the display
control to text you will get the text of your non-rich text field and the
HTML of the Rich text field.

To do this without the return you need to remove the hidden html <DIV> in
the field.
=[YourTextBox] & " " & Right([MemoField1],Len([MemoField1])-5)

Jim said:
I'm a new user to Access 2007 (starting today - former user of Access 2000
and 2003)

I need to create a Text or Memo field for which the records may contain
multiple different fonts. I am aware of the Rich Text property for Memo
fields (in 2007).

When I create a Memo fields that is Rich Text enabled and concatenate it
with another another Memo or Text field, the resulting Memo field has a
line
break inserted between the joined fields.

If I concatenate a Memo field (Plain Text enabled) with another Memo or
Text, it does NOT insert the line break.

Any suggestions about how I can prevent the line break?
 
P

Pete D.

That should work, to see it and make it easier to understand put a empty
memo box on the screen in plain text format and use your rich text box as
the source. You will then see the hidden code which will help you figure
out what you can't see and how to fix it.

Jim said:
Thanks. Your reply suggests that I need to strip 5 characters from the
richtext memo.

Is the text string <DIV> stored at the beginning or the end of the HTML
for
a richtext memo field? Is this consistent?

If I try to concatenate 2 richtext memos without the line break, is the
command:

Right([MemoField1],Len([MemoField1])-5) & " " &
Right([MemoField2],Len([MemoField2])-5)

or is it:

Left([MemoField1],Len([MemoField1])-5) & " " &
Left([MemoField2],Len([MemoField2])-5)

--
Jim


Pete D. said:
If you join these fields you need to know about how rich text is stored
as
HTML. If you then display the text field and richtext memo field in a
richtext control you will get the return. If you change the display
control to text you will get the text of your non-rich text field and the
HTML of the Rich text field.

To do this without the return you need to remove the hidden html <DIV>
in
the field.
=[YourTextBox] & " " & Right([MemoField1],Len([MemoField1])-5)

Jim said:
I'm a new user to Access 2007 (starting today - former user of Access
2000
and 2003)

I need to create a Text or Memo field for which the records may contain
multiple different fonts. I am aware of the Rich Text property for
Memo
fields (in 2007).

When I create a Memo fields that is Rich Text enabled and concatenate
it
with another another Memo or Text field, the resulting Memo field has a
line
break inserted between the joined fields.

If I concatenate a Memo field (Plain Text enabled) with another Memo or
Text, it does NOT insert the line break.

Any suggestions about how I can prevent the line break?
 
J

Jim

Got it. I need to strip 6 characters from the right of the first memo, and 5
from the left of the second one.

Thank you very much

--
Jim


Pete D. said:
That should work, to see it and make it easier to understand put a empty
memo box on the screen in plain text format and use your rich text box as
the source. You will then see the hidden code which will help you figure
out what you can't see and how to fix it.

Jim said:
Thanks. Your reply suggests that I need to strip 5 characters from the
richtext memo.

Is the text string <DIV> stored at the beginning or the end of the HTML
for
a richtext memo field? Is this consistent?

If I try to concatenate 2 richtext memos without the line break, is the
command:

Right([MemoField1],Len([MemoField1])-5) & " " &
Right([MemoField2],Len([MemoField2])-5)

or is it:

Left([MemoField1],Len([MemoField1])-5) & " " &
Left([MemoField2],Len([MemoField2])-5)

--
Jim


Pete D. said:
If you join these fields you need to know about how rich text is stored
as
HTML. If you then display the text field and richtext memo field in a
richtext control you will get the return. If you change the display
control to text you will get the text of your non-rich text field and the
HTML of the Rich text field.

To do this without the return you need to remove the hidden html <DIV>
in
the field.
=[YourTextBox] & " " & Right([MemoField1],Len([MemoField1])-5)

"Jim" <nachbar at sjeye.com> wrote in message
I'm a new user to Access 2007 (starting today - former user of Access
2000
and 2003)

I need to create a Text or Memo field for which the records may contain
multiple different fonts. I am aware of the Rich Text property for
Memo
fields (in 2007).

When I create a Memo fields that is Rich Text enabled and concatenate
it
with another another Memo or Text field, the resulting Memo field has a
line
break inserted between the joined fields.

If I concatenate a Memo field (Plain Text enabled) with another Memo or
Text, it does NOT insert the line break.

Any suggestions about how I can prevent the line break?
 

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