ACC2: No "Can't Add Records" Data Mode Arg. for OpenFormLast reviewed: May 12, 1997Article ID: Q129301 |
The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills. When you set the OpenForm macro action's Data Mode argument, you can select Add, Edit, or Read Only, but the Can't Add Records option that you can select for the form's DefaultEditing property is not available.
RESOLUTIONTo work around this behavior, use Access Basic code to pass the specified DefaultEditing property setting in the OpenArgs argument and set the property in the form's Load event. See the "More Information" section for an example of how to use the OpenArgs argument.
STATUSThis behavior is by design.
MORE INFORMATIONThe following example demonstrates how you can use the OpenForm macro action's OpenArgs argument to pass the specified data mode for use in a form. By using this argument, you can open a form with the Can't Add Records data mode. CAUTION: Following the steps in this example will modify the sample database NWIND.MDB. You may want to back up the NWIND.MDB file, or perform these steps on a copy of the NWIND database.
1 = Data Entry 2 = Allow Edits 3 = Read Only 4 = Can't Add Records Opening the Form with a FilterIf you set the form's DefaultEditing property to Can't Add Records, you remove any filter that you applied to the form. To open the form so that it retains the filter, use the OpenForm macro action's Filter Name or Where Condition arguments to set the form's DefaultEditing property to Can't Add Records. To pass the filter, use the OpenArgs argument. For more information about how setting the DefaultEditing property to Can't Add Records removes any filter, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q129302 TITLE : ACC2: DefaultEditing Set to Can't Add Records Removes FilterTo open the form with a filter, follow these steps:
REFERENCESFor more information about the DefaultEditing property, search for "DefaultEditing," and then "AllowEditing, DefaultEditing Properties" using the Microsoft Access Help menu. |
Keywords : FmsProp kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |