ACC2: DefaultEditing Set to "Can't Add Records" Removes FilterLast reviewed: May 14, 1997Article ID: Q129302 |
The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills. When you use Access Basic code to set a form's DefaultEditing property to Can't Add Records, any filter that you apply to the form is removed and all the records are displayed.
RESOLUTIONTo work around this problem, re-apply the filter after you set the DefaultEditing property to Can't Add Records.
STATUSMicrosoft has confirmed this to be a problem in Microsoft Access version 2.0. This problem no longer occurs in Microsoft Access version 7.0.
MORE INFORMATIONBecause the Can't Add Records option for the DefaultEditing property is not available in the OpenForm macro action's Data Mode argument, you must use Access Basic code to set the property in the form's Load event. But if you set the property in the form's Load event, when the form opens, any filter you apply to the OpenForm action's Filter Name or Where Condition argument is removed. For more information about opening a form with the Can't Add Records data mode, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q129301 TITLE : ACC2: No "Can't Add Records" Data Mode Arg. in OpenForm Action Steps to Reproduce ProblemThe following example demonstrates the problem described in this article. For an example that demonstrates how you can work around this problem, see the "Work Around" section later in this article. 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.
Work AroundTo open the form with a filter, pass the Where Condition argument and the specified DefaultEditing property setting in the OpenArgs argument. In the form's Load event, parse the components and apply the filter after setting the specified DefaultEditing property.
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. |