Office Settings & Configuration

How to Prevent Access Datasheet View Changes from Being Saved

Algirdas JasaitisAlgirdas Jasaitis Oct 22, 2026 868 views

Question details

The user needs to stop Microsoft Access from automatically saving layout changes made by users in Datasheet view.

How to Prevent Access Datasheet View Changes from Being Saved
Product
Microsoft Access
Device & OS
not provided
Scenario
Users interact with forms in Datasheet view, modifying column orders, resizing widths, and applying filters, but the application should discard these changes upon closing.
Observed behavior
Access automatically saves the users' column resizing, column order, and filter changes, altering the default design-time layout for subsequent sessions.
Before you start

Before modifying form properties or adding VBA code, ensure you have created a backup copy of your Microsoft Access database to prevent accidental data or design loss.

Solution 1Recommended

Use DoCmd.Close with acSaveNo in VBA

Force Microsoft Access to discard any design or layout changes made during the session by explicitly closing the form via VBA.

By intercepting the form's close action with a specific VBA command, you can dictate exactly how Microsoft Access handles modifications made to the layout.

1
Open your form in Design View

Launch your Microsoft Access database, locate the target form in the Navigation Pane, right-click it, and select 'Design View'.

2
Add a Close button

Navigate to the Form Design tab, select the 'Button' control, and place it on your form. Cancel the wizard if it appears.

3
Access the VBA Editor

With the button selected, open the Property Sheet (F4), go to the 'Event' tab, click the ellipsis (...) next to 'On Click', and choose 'Code Builder'.

4
Insert the DoCmd.Close code

In the VBA editor, type the following code between Private Sub and End Sub: DoCmd.Close acForm, Me.Name, acSaveNo

5
Save and test

Save your VBA code and form design. Open the form in Datasheet view, change a column width, and click your new Close button. Reopen the form to verify the original layout is restored.

Use DoCmd.Close with acSaveNo in VBA
Consistent Layouts: Using acSaveNo ensures that the original design-time layout is preserved every time the form is reopened, without affecting data entry saves.
Free Microsoft Office alternative

Looking for a Reliable, Free Office Suite?

While Microsoft Access requires a paid Microsoft 365 subscription for database management, you can handle all your daily document, spreadsheet, and presentation needs for free with WPS Office. It provides a lightweight, highly compatible alternative to Microsoft Word, Excel, and PowerPoint.

Fully compatible with Microsoft Office formats (.docx, .xlsx, .pptx).Familiar user interface with zero learning curve for easy migration.Lightweight installation that runs smoothly on older operating systems.Built-in AI tools to boost your productivity in documents and spreadsheets.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Access save my datasheet layout changes automatically?

By default, Microsoft Access is designed to remember user preferences such as column widths, column orders, and applied filters in Datasheet view. This behavior is intended to provide a personalized user experience without requiring reconfiguration each time the database is opened.

Does the acSaveNo command discard new data entries?

No, using DoCmd.Close with acSaveNo only discards changes made to the design or layout of the form (like resizing a column). Record additions, deletions, and edits to the actual database tables are still saved normally as users interact with the data.

Can I disable layout saving without using VBA code?

Yes, splitting your database and converting the front-end to an ACCDE file is a code-free alternative. An ACCDE file compiles the application and locks down all design capabilities, preventing users from permanently saving their layout modifications.