smurray20
asked on
Ms Access 2007 text box formatting problem
I have a text box on a MS Access report.
The source is a memo field in a table that I have imported from a SQL Server database.
When I display the field in a report none of the formatting is preserved, instead all the text runs together in one line.
How can I fix this so it preserves line breaks and carriage returns?
Thanks
Suzanne
The source is a memo field in a table that I have imported from a SQL Server database.
When I display the field in a report none of the formatting is preserved, instead all the text runs together in one line.
How can I fix this so it preserves line breaks and carriage returns?
Thanks
Suzanne
Have you set the report control;s Text Format property to RichText?
ASKER
Yes, have tried this but it doesn't make any difference.
Any other ideas?
Any other ideas?
If you view the data on a Form, is it formatted correctly?
ASKER
yes
Did you check that the RichText property is set in both the Table and the Report?
>I have a text box on a MS Access report.
Try using a RichTextBox control instead of a textbox.
From Report Design, Toolbox toolbar, click on the toolbox icon with three dots, then scroll down to 'Microsoft RichTextBox (some version)'.
Left-click, hold, and drag like you were adding a textbox.
Once it's set, do a right-click:Properties, and set the Control source.
Try using a RichTextBox control instead of a textbox.
From Report Design, Toolbox toolbar, click on the toolbox icon with three dots, then scroll down to 'Microsoft RichTextBox (some version)'.
Left-click, hold, and drag like you were adding a textbox.
Once it's set, do a right-click:Properties, and set the Control source.
ASKER
Will those work if I have to convert the database to a 97-2002 compatible one?
The only way to show RichText in older versions is to do as jimhorn suggests and use an ActiveX control. Even then, you can't use those in Reports.
Stephen Lebans has a fix for that: http://www.lebans.com/richtext.htm
Or you can use the FMS Total Access Memo: http://www.fmsinc.com/MicrosoftAccess/memo.html
Stephen Lebans has a fix for that: http://www.lebans.com/richtext.htm
Or you can use the FMS Total Access Memo: http://www.fmsinc.com/MicrosoftAccess/memo.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
How do I close the question?
I am having the same problem on my report. I tried using a RichTextBox control and that worked, but I do not see an option for "Can Grow" and "Can Shrink" on the RichTextBox control. I do not understand what was meant in the solution: = Replace([myfield],Chr(13), Chr(13))
I put this in the Format property in the Textbox, but all it did was truncate the text. Any help? Thanks.
I put this in the Format property in the Textbox, but all it did was truncate the text. Any help? Thanks.
>Any help?
Certainly. Ask it as your own question, instead of piggy-backing on one that hasn't been commented on since January.
That way, all experts will see it.
This way, only the experts that commented in this question will see it, and since there are no points up for grabs, motivation is somewhat low.
Certainly. Ask it as your own question, instead of piggy-backing on one that hasn't been commented on since January.
That way, all experts will see it.
This way, only the experts that commented in this question will see it, and since there are no points up for grabs, motivation is somewhat low.
What this means that you can write a VBA script to replace the chr(13). It worked for me with a modified version. i.e. = Replace([myfield],Chr(13), Chr(13) & Chr(10)).