Office Apps Crashing

Fix Microsoft Access Crashing When Opening a Form

Olivia MillerOlivia Miller Nov 2, 2026 869 views

Question details

Users experience a Microsoft Access front end crash the first time a form is opened each day via a search form using the DoCmd.FindRecord method.

Fix Microsoft Access Crashing When Opening a Form for the First Time
Product
Microsoft Access
Device & OS
not provided
Scenario
A user tries to open an Access form from a search form, moving focus to a reference field and using VBA to locate a specific record.
Observed behavior
The application unexpectedly crashes on the initial attempt of the day when executing the older DoCmd.FindRecord approach.
Before you start

Before modifying your VBA code, ensure you have created a complete backup copy of your Access database front end to prevent any unintended data loss during debugging.

Solution 1Recommended

Replace DoCmd.FindRecord with a Filtered DoCmd.OpenForm

The older FindRecord method requires moving focus and can cause stability issues. Opening the form directly with a WhereCondition is more reliable and efficient.

Instead of opening the form, moving the focus, and then searching for the record, you should directly pass a filter to the form as it opens. This prevents the sequence of events that typically triggers the first-run crash.

1
Access the VBA Editor

Open your Microsoft Access database and press ALT + F11 to open the VBA Editor.

2
Locate the problematic code

Find the command button click event or macro in your search form that currently opens the target form and uses the DoCmd.FindRecord method.

3
Remove the old FindRecord method

Comment out or delete the lines of code that move focus to the reference field and execute DoCmd.FindRecord.

4
Implement the OpenForm WhereCondition

Add the following code to open the form directly. If the Reference field is numeric, use: DoCmd.OpenForm "Accounts", WhereCondition:="Reference = " & Me.Reference

5
Adjust for text fields (if applicable)

If your Reference field contains text instead of numbers, you must enclose the value in quotes. Use: DoCmd.OpenForm "Accounts", WhereCondition:="Reference = '" & Me.Reference & "'"

Add Error Handling: Consider adding standard VBA error handling (On Error GoTo...) to this block to gracefully catch any future issues rather than allowing the application to crash.
Free Microsoft Office alternative

Looking for a more stable Office experience? Try WPS Office

While WPS Office does not include a direct replacement for MS Access databases, it provides a highly stable, lightweight, and free alternative for your Word, Excel, and PowerPoint tasks. Avoid unexpected application crashes during your daily documentation and data analysis with WPS Office.

  1. 1. Download the installer: Visit the official WPS Office website and click the free download button.
  2. 2. Install the software: Run the downloaded executable file and follow the lightweight, one-click installation process.
  3. 3. Open your documents: Launch WPS Office and instantly open your existing .docx, .xlsx, or .pptx files without formatting loss.
Highly stable application architecture designed to prevent sudden crashes during daily use.Fully compatible with Microsoft Word, Excel, and PowerPoint file formats (.docx, .xlsx, .pptx).Lightweight installation that consumes minimal system resources and loads instantly.Familiar tabbed user interface, making the transition seamless for Microsoft Office users.
microsoft office alternative - wps office

Frequently Asked Questions

Why does MS Access only crash on the first run of the day?

This typically occurs because the front-end application is loading corrupted compiled VBA code into memory for the first time, or an older method like DoCmd.FindRecord struggles to initialize form focus properly upon cold startup. Decompiling the database often resolves this.

How do I handle text fields in my VBA WhereCondition?

When passing a text string to a WhereCondition in Access VBA, you must enclose the variable in quotes. For example, you can use single quotes inside the string: WhereCondition:="Reference = '" & Me.Reference & "'".

What is the difference between DoCmd.FindRecord and DoCmd.OpenForm with a filter?

DoCmd.FindRecord mimics a user manually pressing Ctrl+F to search an already opened form, which requires shifting window focus and can trigger instability. DoCmd.OpenForm with a filter (WhereCondition) directly queries the database engine and loads only the matching record, making it significantly faster and less prone to crashing.