BruceM said:
Concatenating will probably work for you. Chr(13) & Chr(10) will
accomplish what amounts to a line break. In query design view, create a
concatenated field by adding something like the following to the query
design grid:
CombinedField: [FirstLineField] & Chr(13) & Chr(10) & [SecondLineField]
Bind a text box on the form to that field. Set the text box just tall
enough for one line of text, and set its Can Grow property to Yes. Set
the Can Grow property of the Detail section to Yes as needed. Note that
Chr(13) & Chr(10) needs to be in that order.
You could do the same thing by setting the Control Source of an unbound
text box to:
= [FirstLineField] & Chr(13) & Chr(10) & [SecondLineField]
In VBA vbCrLf can substitute for Chr(13) & Chr(10).
If there is the chance of blank lines they can be eliminated with an IIf
statement. Post back if you need details.
Bruce, this solved my problem nicely. I had to make some iif's but the
result is perfect.
However, I have another place where I need to convert som html code's into
something understandable for MS-access. For instance I have this text
string where I would like to convert the <BR>'s into linebreaks in the
report:
<BR>Bitte verwenden Sie folgende Daten für die Überweisung des
Gesamtbetrages.<BR>
Als Verwendungszweck geben Sie bitte Ihren Namen und Ihre Bestellnummer
an.<BR><BR>Konto: xxxxxxx
When I do a
pay_info:
IIf([payment_info]='';'';Replace([payment_info];"<BR>";"&Chr(13)&Chr(10)"))
this just results in that the codes are being printed out.