Microsoft KB Archive/138977

{|
 * width="100%"|

PRB: Subform Datasheet Layout Changes Automatically Saved
'Article ID: Q138977

Creation Date: 31-OCT-1995

Revision Date: 03-DEC-1996' The information in this article applies to:


 * Microsoft Access versions 7.0, 97

SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

In Microsoft Access version 7.0 and 97, if a subform is in Datasheet view on a main form and you change the width of the columns on the subform, the changes will be saved automatically when the main form is closed. This behavior differs from Microsoft Access version 2.0 in which layout changes to the subform datasheet are automatically discarded.

CAUSE

This behavior is a new feature of Microsoft Access 7.0 and 97, which makes it significantly easier to edit the layout of a datasheet presented in a subform.

RESOLUTION

To work around this behavior, revoke the Modify Design permissions option for users who should not be allowed to save these layout changes. Subform layout changes will silently be discarded if the current user does not have Modify Design permissions. See the "Steps to Reproduce Behavior" section later in this article for an example demonstrating this technique.

MORE INFORMATION

In Microsoft Access versions 1.x and 2.0, developers often relied on the fact that datasheet layout changes are discarded when the datasheet is presented in a subform. They used this technique to avoid the "Do you want to save changes?" prompt if layout changes were made to a normal Datasheet view form. This particular behavior made it difficult and tedious to alter the actual layout of the datasheet. For more information about this topic, please see the following article in the Microsoft Knowledge Base:

ARTICLE-ID: Q105656 TITLE    : PRB: Subform ColumnWidth Changes Made in Main Form Not Saved Steps to Reproduce Behavior


 * 1) Open the sample database Northwind.mdb.
 * 2) Open the Orders form. Change the column width of one of the fields in the Orders Subform. Close the Orders form, and then reopen the Orders form. Note that the new column width change was retained.
 * 3) Close the Orders form.
 * 4) On the Tools menu, point to Security, and then click User and Group Permissions.
 * 5) Click Form in the Object Type box. Click Orders in the Object Name list.
 * 6) Click Users. Click Admin in the User/Group Name list, and then click to clear Modify Design in the Permissions group.
 * 7) Click Groups. Click Users in the User/Group Name list. Click to clear Modify Design in the Permissions group.
 * 8) Click OK.
 * 9) Repeat step 2 above. Note that the new column width change was discarded.
 * }

-

"THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED 'AS IS' WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY." '' ©1997 Microsoft Corporation. All rights reserved. Legal Notices.

''

KBCategory: kbusage

KBSubcategory: FmsSubf

Additional reference words: 7.00 97 8.00