Forum Discussion
Merging formatted text boxes in MS Access
Hi,
In your first picture the formatting seems to be taken from the labels on the left side, not from the actual text boxes.
In your second picture it is not clear for me where the formatting comes from. I just see what could be Access text boxes but without much formatting like colors. So, what kind of settings, expressions etc. did you use in your attempt?
If you would use (Rich-Text) formatted text boxes as "source" text boxes, then you should be able to simply concatenate them with & for a combined result. e.g. as Control Source of RichTextbox3:
=[RichtTextbox1] & " " & [RichTextbox2]
Servus
Karl
****************
Access Forever
Access News
Access DevCon
Access-Entwickler-Konferenz AEK
Hi Karl,
You make valid points. I have tried [RichTextbox1] & “ “ & [RichTextbox1] and it did not work.
The resulting merged text field was not able to preserve the formatting of BOTH of the original text boxes that were concatenated.
This is illustrated in the images below.
The "Term" text box was clearly BLUE and BOLD, and the "PartOfSpeech" text box was clearly grey and italicized. When the two text boxes were concatenated, the second text box lost its formatting (this can be seen in the last image, which is Print Preview mode).
.
- peiyezhuJul 14, 2024Bronze ContributorThe "Term" text box was clearly BLUE and BOLD, and the "PartOfSpeech" text box was clearly grey and italicized. When the two text boxes were concatenated,
The text boxes concatnated only values without format/style in fact.- DMP2024Jul 14, 2024Copper Contributor
Exactly. The text boxes concatenated.
But when that happened, the PartOfSpeech text box did not maintain its formatting/style.That was completely lost.
Thanks so much.
- Jul 13, 2024
Hi,
In my quick test it works as expected, i.e. all formattings are preserved in the resulting text box.
Maybe you should not try to "help" us 😉 by painting the text in design view etc. but just show what you really have in design view to get this result in print preview or the other way round, i.e. a design view with the real expression (e.g. incl. the separating comma) and a matching print preview with the same three controls, spacing etc.
Servus
Karl
****************
Access News
Access Forever
Access DevCon
Access-Entwickler-Konferenz AEK- DMP2024Jul 13, 2024Copper Contributor
Hi Karl
Could you please provide a screen grab of your results? I would love to see them.
Regarding your request to "not try to help us by painting the text in design view," - we'll that's where you format the text. Some text I want in Blue, and other text I want in grey. Where else would I format that text if not in design view?
When I say formatting: I mean that whatever colors, italics or bolds that I have put in the textbox, that should survive concatenation.
So, if one text box looks like this: Broadway And another text box looks like this: broadway, then the results after concatenation should be: Broadwaybroadway.
But let's see your screen grab and we can take it from there.
Thanks again!
- Jul 13, 2024
Hi,
> Where else would I format that text if not in design view?
Ok, now it's clear why it doesn't work for you: You are not using the assumed Rich Text (HTML) format for the fields in the table but just format the text boxes in design view of the report. So, the solution would be to use Rich Text fields.
Servus
Karl
****************
Access News
Access Forever
Access DevCon
Access-Entwickler-Konferenz AEK