Display tab character from memo field to report correctly.

Posted on 2006-03-29
Last Modified: 2012-06-21
I'm using Access 2003.  I have a table with a memo field in which the user perform data entry by copying and pasting from Word documents.  I created a report to display the memo field but special characters such as tabs are displayed on the report as a small box.  

How can I make the report NOT display the box and actually show empty spaces represented by the tab?

p.s. This is urgent so if I can get any solution today, I will grade with A
Question by:LT012345
    LVL 65

    Expert Comment

    by:Jim Horn
    You will need a Microsoft RichTextBox control instead of a textbox.  
    In Access RichTextBox is not one of the standard controls in the toolbox, so you'll have to click on the 'More Controls' button and scroll down.
    LVL 39

    Accepted Solution

    You can put this in the control source property of the textbox (be sure the name of the textbox is different from the field).
    =Replace([YourFieldNameHere], Chr(9), Spaces(5))
    Chr(9) is the tab character,  Change the 5 to the number of spaces you want to replace the tab character with.  This will not change the memo field.  It will only change the display of the memo field in the form (or report)

    To change the memo field itself, use an update query like this:
    Update YourTableNameHere Set YourFieldNameHere = Replace([YourFieldNameHere], Chr(9), Spaces(5));
    This will go through the table and change every record.  Be sure to backup your database before running it!!!!

    Author Comment


    When I tried to drop the Microsoft RichText Box control, Access won't let me, saying it doesn't support this type of control.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
    In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
    Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now