Microsoft KB Archive/237938

= ACC2000: Silent Design Changes May Be Discarded in MultiUser Environment =

Article ID: 237938

Article Last Modified on 6/28/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q237938



Advanced: Requires expert coding, interoperability, and multiuser skills.

This article applies only to a Microsoft Access database (.mdb).

For a Microsoft Access 2002 version of this article, see 285828.



SYMPTOMS
Silent design changes made to Microsoft Access-specific objects, such as forms, reports, macros, modules, or commandbars, may be discarded without warning.



CAUSE
The database has been opened by multiple users, and Microsoft Access cannot obtain an exclusive lock on the database.



STATUS
This behavior is by design. In order to save design changes to any Access-specific objects (forms, reports, macros, modules, or commandbars), Access must be able to obtain an exclusive lock on the database. If the database is currently in use by multiple users, Access cannot obtain an exclusive lock and cannot save the design change.



MORE INFORMATION
For additional information about Microsoft Access requiring exclusive locks for saving design changes, please see the following article in the Microsoft Knowledge Base:

200290 ACC2000: Need Exclusive Lock to Save Design Changes to Objects

Because all design changes require an exclusive lock in order to be saved, Microsoft Access may not warn you if the design change can't be saved at the current time. If Access considers the design change to be a "major" change, such as modifying the design of a form, then you are warned if the design change can't be saved at the current time because it cannot obtain an exclusive lock. However, if Access considers the design change to be a "minor" change, such as applying a filter to a form, then it silently discards the design change if it cannot obtain an exclusive lock. These two categories of design changes are known as "Major Edits" and "Minor Edits."

Major Edits
Major edits are design changes that Access must be able to save, or it must warn the user that the change cannot be saved until Access can obtain an exclusive lock on the database. This prevents the Access developer from losing design changes without any warning. The following is a list of design changes that Access considers to be major edits:
 * Modifying any Microsoft Access-specific object in Design view
 * Modifying the property sheet of forms open in Form view
 * Performing a Save As operation to create a new object from an existing object
 * Adding or removing references in the Visual Basic Environment
 * Changing project properties in the Visual Basic Environment
 * Creating or deleting custom commandbars
 * Modifying the control set of custom commandbars
 * Renaming, deleting, cutting, or pasting an object in the database window
 * Creating, modifying, or deleting custom groups in the database window
 * Creating, modifying, or deleting links to data access pages in the Database window

Minor Edits
Minor edits are design changes that are silent in nature, and are discarded if Access cannot obtain an exclusive lock on the database. This prevents users from receiving a warning that their design change cannot be saved when they make a minor modification. The following is a list of design changes that Access considers to be minor edits:
 * Applying a filter to a form
 * Applying a quick sort (A-Z, Z-A buttons) to a form
 * Changing printer settings for a form or report
 * Changing any formatting attributes of a form in Datasheet view (column width, row height, font name, color, freezing/unfreezing columns, etc.)
 * Changing the visibility or location of custom commandbars
 * Changing the source of an unbound OLE object frame in Form view
 * Changing the layout of the Database window (large icon, small icon, list, or detail view)

The following are two exceptions when Access does not discard minor edits when it is unable to obtain an exclusive lock:


 * There are other unsaved major edits pending.
 * You make an explicit attempt to save the object, either by clicking the Save command on the File menu or the Save button on the toolbar.

In both cases, Access treats the minor edit as a major edit. For instance, if you apply a filter to a form in a database opened by multiple users, and then explicitly try to save the form, Access treats the save as a major edit and warns you that the object cannot be saved now because an exclusive lock could not be obtained.

Steps to Reproduce Behavior
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.

 Start Microsoft Access. Open the sample database Northwind.mdb. Open the Customers form in Form view. On the Records menu, point to Filter, and then click Filter by Form. In the CustomerID field, type:

LIKE "a*"

</li> On the Filter menu, click Apply Filter/Sort. Note that the form is correctly filtered to show only records where the CustomerID begins with the letter "a".</li> Close the form. You do not receive a confirmation to save the form.</li> Open the form in Design view.</li> On the View menu, click Properties to view the form's properties. Note that the form's Filter property is set to the following:

(((Customers.CustomerID) Like "a*"))

This indicates that the form's Filter property was saved silently after you applied the filter and closed the form.</li> Clear the form's Filter property.</li> Close and save the form.</li> Start another instance of Microsoft Access.</li> Open the sample database Northwind.mdb in the second instance of Microsoft Access.</li> Using the first instance of Microsoft Access, repeat steps 3 through 9.</li></ol>

When you view the form's Filter property in Design view, note that it is blank. This indicates that Microsoft Access silently discarded the design change because Access could not obtain an exclusive lock on the database.

Additional query words: prb

Keywords: kbprb KB237938

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.