ACC1x: ApplyFilter Action Causes Form to Be Read-Only

ID: Q99318


The information in this article applies to:


SYMPTOMS

Running a macro that contains an ApplyFilter action may cause a form to become read-only. This problem occurs if the form is based on a query that contains two tables with a one-to-many relationship and only records from the one side are included in the output of the query.


RESOLUTION

There is no way to prevent the ApplyFilter action from making the form read-only. However, you can use one of the following methods to filter the records displayed in a form:


STATUS

Microsoft has confirmed this to be a problem in Microsoft Access version 1.0. This problem no longer occurs in version 1.1.

Steps to Reproduce Problem


  1. In the sample database NWIND.MDB, create a new query based on the Customers and Orders tables. Join the tables on [Customer ID].


  2. Drag all fields from the Customers table to the query grid. Drag down [Order ID] from the Order table. Add the criteria: >10080 and clear the Show box.


  3. Save the query and create a new form based on it. Drag several fields from the field list to the form.


  4. Create a macro with an ApplyFilter action. Set the macro's Where Condition argument to:

    [Company Name] Like "c*"


  5. Save the macro and drag it onto the form.


  6. Switch to Form view. Verify that you can edit fields.


  7. Press the macro button to apply the filter.


You can no longer edit or add records.

Additional query words: dynaset lock query


Keywords          : kbusage McrActn 
Version           : 1.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: March 23, 1999