[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Ms Access 2007 text box formatting problem

Posted on 2008-01-28
13
Medium Priority
?
2,910 Views
Last Modified: 2013-11-28
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
0
Comment
Question by:smurray20
  • 5
  • 4
  • 2
  • +2
13 Comments
 
LVL 85
ID: 20761128
Have you set the report control;s Text Format property to RichText?
0
 

Author Comment

by:smurray20
ID: 20761137
Yes, have tried this but it doesn't make any difference.
Any other ideas?
0
 
LVL 85
ID: 20761184
If you view the data on a Form, is it formatted correctly?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 

Author Comment

by:smurray20
ID: 20761200
yes
0
 
LVL 85
ID: 20761534
Did you check that the RichText property is set in both the Table and the Report?
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 20762514
>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.
0
 

Author Comment

by:smurray20
ID: 20762531
Will those work if I have to convert the database to a 97-2002 compatible one?
0
 
LVL 85
ID: 20769432
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
0
 

Accepted Solution

by:
smurray20 earned 0 total points
ID: 20770118
I actually managed to solve the problem myself!

= Replace([myfield],Chr(13), Chr(13))

I'm not sure why this worked but it did!

Thanks for trying to help though!
Suzanne
0
 

Author Comment

by:smurray20
ID: 20770122
How do I close the question?
0
 
LVL 1

Expert Comment

by:silkd
ID: 22560100
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.
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 22560217
>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.
0
 
LVL 3

Expert Comment

by:Ritz93
ID: 23305356
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)).

0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
A quick solution showing how to control and open a POS Cash Register Drawer using VBA with MS Access.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…
Suggested Courses
Course of the Month7 days, 22 hours left to enroll

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question