ACC: How to Set AllowZeroLength Property to Yes in All TablesLast reviewed: August 29, 1997Article ID: Q130336 |
The information in this article applies to:
SUMMARYModerate: Requires basic macro, coding, and interoperability skills. This article demonstrates a user-defined function that you can use to set the AllowZeroLength property to Yes for all the Text and Memo fields in every table in a database. This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to your version of the "Building Applications with Microsoft Access" manual. NOTE: Visual Basic for Applications is called Access Basic in Microsoft Access version 2.0. For more information about Access Basic, please refer to the "Building Applications" manual.
MORE INFORMATIONBy 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, but you can set the AllowZeroLength property to Yes for every table in a database by following these steps. CAUTION: Following the steps in this example will modify the sample database Northwind.mdb (or NWIND.MDB in version 2.0). You may want to back up the Northwind.mdb file or perform these steps on a copy of the Northwind database. NOTE: In the following sample code, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of the line when re-creating this code in Access Basic.
REFERENCESFor more information about the AllowZeroLength property, search the Help Index for AllowZeroLength property" or ask the Microsoft Access 97 Office Assistant. Keywords : kbprg PgmHowTo PgmLoop PgmObj MdlDao Version : 2.0 7.0 97 Platform : WINDOWS Hardware : x86 Issue type : kbhowto |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |