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.