Article ID: 210278 - Last Review: January 26, 2005 - Revision: 2.1 ACC2000: How to Set AllowZeroLength Property to Yes in All TablesThis article was previously published under Q210278 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access database (.mdb). SUMMARY
This article shows you how to create a user-defined function to set
the AllowZeroLength property to Yes for all the Text and Memo fields in every table in a database.
MORE INFORMATION
By setting the AllowZeroLength property, you can control whether a
zero-length string ("") is a valid entry for Text and Memo fields. The
default setting for the AllowZeroLength property is No. To set the AllowZeroLength property to Yes for every table in a database, follow these steps:
CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database. NOTE: The sample code in this article uses Microsoft Data Access Objects. For this code to run properly, you must reference the Microsoft DAO 3.6 Object Library. To do so, click References on the Tools menu in the Visual Basic Editor, and make sure that the Microsoft DAO 3.6 Object Library check box is selected.
REFERENCESFor more information about the AllowZeroLength property, click Microsoft Access Help on the Help menu, type allowzerolength property in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
| Article Translations
|
Back to the top
