locked
Textbox ControlSource on report truncating at 256 characters RRS feed

  • Question

  • In Access 2010 I have an occasional and not reproducible error in which the control source of a textbox on a report gets truncated at 256 characters when opened in design view.  The report I was working on today is a form letter in which many of the fixed paragraphs on the report are textboxes with literal large blocks of text in them (i..e where ControlSource is ="<large block of text>", not bound to a field).  I opened the report in design view and opened the properties window for the textbox I wanted to edit and then pressed shift-f2 to open the zoom window in the Control Source field.  When the zoom window opened the ControlSource value, a large block of text in quotes preceded by an =, was truncated to 256 characters.  No problem, I thought, I'll just paste in the new text I wanted to add and bookend it with double quotes as it should be.  When I closed the zoom window with my new large block of text I got a "text is too long to be edited" error.  I then closed the report without saving it, reopened it in design view, and was able to make my edits without further problem.

    I see this error frequently enough to be annoying yet it does not happen consistently.  I am curious if others have seen it and if it continues to occur in later versions of Access.  Better still, is there a fix?  Thanks.

    -Bruce

    Thursday, May 7, 2020 7:41 PM

All replies

  • I have not seen this.  As a workaround, have you considered storing the blocks of text in a table (in Long Text fields) and using DLookup expressions as the controlsources?


    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    Thursday, May 7, 2020 9:14 PM
  • Hi Dirk, 

    I appreciate the thought.  I can think of numerous workarounds (including the one I gave of simply closing and reopening the report). It doesn't always happen but happens frequently enough to be a nuisance, and seemingly without rhyme or reason.  This app is repair/compacted pretty frequently (and occasionally decompiled) but it might yet be a subtle corruption problem.  I was just curious if anyone had seen similar and what the cause might be.  Thanks!

    -Bruce

    Thursday, May 7, 2020 9:26 PM
  • I've regularly come across this behaviour with label controls, and have found the solution is to paste the new string expression for the label's caption property directly into the control in design view, rather than into the properties sheet or zoom dialogue.

    Ken Sheridan, Stafford, England

    Friday, May 8, 2020 2:50 PM
  • Thanks Ken, I'll try this when I run into this problem again.  In what versions of Access do you note this behavior?

    -Bruce

    Friday, May 8, 2020 2:53 PM
  • In what versions of Access do you note this behavior?


    I've certainly encountered it in Access 2016 and 365.  Before that I can't recall.

    Ken Sheridan, Stafford, England

    Friday, May 8, 2020 2:57 PM