Microsoft KB Archive/200459

= ACC2000: You Cannot Enter Zero-Length Strings on Data Access Pages =

Article ID: 200459

Article Last Modified on 6/30/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q200459



Novice: Requires knowledge of the user interface on single-user computers.

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



SYMPTOMS
If you type two quotation marks ("") in a control on a data access page, Access will store the quotation marks rather than a zero-length string in the underlying table.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
Typically, when you type two quotation marks (often referred to as "double quotes") in a control that allows entry of zero-length strings, Access replaces the quotation marks with a zero-length string as soon as the focus leaves the control. This does not happen, however, if you add the quotation marks to a control on a data access page. On a data access page, the literal quotation mark characters are stored in the underlying table.

Steps to Reproduce the Problem

 * 1) Open the sample database Northwind.mdb.
 * 2) Open the Customers table in Design view.
 * 3) Set the AllowZeroLength property of the CompanyName field to Yes.
 * 4) Save the changes, and then view the table in Datasheet view.
 * 5) Add a new record, and then type AAAAA in the CustomerID field and two quotation marks in the CompanyName field.
 * 6) Press TAB to exit the CompanyName field. Note that when the focus leaves the CompanyName field, the quotation marks disappear (that is, they are replaced by a zero-length string).
 * 7) Close the table, and then use the AutoPage: Columnar Wizard to create a new data access page that is based on the Customers table.
 * 8) Add a new record on the page, and then type AAAAB in the CustomerID field and two quotation marks in the CompanyName field.
 * 9) Press TAB to exit the CompanyName field. Note that the quotation marks remain in the control.
 * 10) Save the record by clicking Save Record on the Record Navigation toolbar.
 * 11) Close the page, and click No when you are prompted to save the page.
 * 12) Open the Customers table in Datasheet view. Note that the record for CustomerID AAAAA has no quotation marks in CompanyName, but the record for CustomerID AAAAB does have two quotation marks in the CompanyName field.

NOTE: If you change the CompanyName field for CustomerID AAAAB while in Datasheet view of the table, the quotation marks will be converted to a zero-length string once focus leaves the field. For example, add a space after "", and then press TAB. Note that the quotation marks disappear.

Additional query words: pra quotes quote zerolength empty string allowzerolength allow zero length dirty

Keywords: kbbug kbdap kbpending KB200459

-

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

© Microsoft Corporation. All rights reserved.