Microsoft KB Archive/918587

= When you enter a list of strings for the RowSource property in an Access form or report, the strings are truncated =

Article ID: 918587

Article Last Modified on 11/3/2006

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition
 * Microsoft Access 2002 Standard Edition
 * Microsoft Office Access 2003
 * Microsoft Office Access 2007

-



SYMPTOMS
Consider the following scenario. In a Microsoft Access form or report, you enter a list of strings for the RowSource property of a combo box or of a list box that displays a value list. When the focus moves away from the RowSource property, the strings that you entered are truncated. For example, if you entered &quot;value &quot;a&quot;&quot;;&quot;value &quot;b&quot;&quot;, these strings are truncated as follows:

&quot; &quot;;&quot;  &quot;

Note The  placeholder represents any value that you might enter. This problem occurs only when a string in the RowSource property starts with a quotation mark. Additionally, this problem may occur for any or all strings in the RowSource property that start with a quotation mark.

Note In this scenario, &quot;quotation mark&quot; refers to either a single quotation mark (') or a double quotation mark (&quot;).



CAUSE
This problem occurs because of the rules that the string parser applies when it analyzes each string that was entered for the RowSource property.

In this case, the string parser analyzes a string that starts with a quotation mark. The string parser moves along the string and searches for another quotation mark that matches the quotation mark that starts the string. When the parser finds the qualified quotation mark, all the characters after that quotation mark will be deleted. However, any two consecutive identical quotation marks that are not at the start of the string will be kept. Neither of these identical quotation marks will be treated as the qualified quotation mark. If the parser cannot find the qualified quotation mark at the end of the string, the string will not be truncated.

The examples in the &quot;More Information&quot; section demonstrate the rules that the string parser applies when it analyzes a string that starts with a quotation mark.



WORKAROUND
When you use quotation marks to delimit strings, make sure that you type a pair of quotation marks for any quotation mark that you want to appear in the value list. For example, assume that you want the following to appear in the value list:

ab&quot;c

In this case, make sure that you type &quot;ab&quot;&quot;c&quot;.

Note When you do not use quotation marks to delimit strings, type only the characters that you want to appear in the value list. For example, assume that you want the following to appear in the value list:

ab&quot;c

In this case, type ab&quot;c.



STATUS
This article applies to a Microsoft Access database (.mdb) and a Microsoft Access project (.adp).

Keywords: kbexpertisebeginner kbtshoot kbprb KB918587

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.