Others

Show a Warning for Blank Required Fields in Microsoft Access

Adam DavisAdam Davis Nov 20, 2026 868 views

Question details

The user wants Access to warn users when required fields are blank before saving a record.

Show a Warning for Blank Required Fields in Microsoft Access
Product
Microsoft Access
Device & OS
not provided
Scenario
A form is used to enter or edit records that contain mandatory fields.
Observed behavior
Access should prevent a record from being saved when required values are missing and display a warning.
Before you start

Identify the form controls and their corresponding fields in the underlying table. For a custom warning, check the control names in the form's Property Sheet and ensure the controls can receive focus.

Solution 1Recommended

Require the fields in the underlying Access table

Use table-level validation to enforce mandatory values wherever records are entered or edited.

1
Open the table design

In the Navigation Pane, right-click the form's underlying table and select Design View.

2
Set fields as required

Select each mandatory field and set Required to Yes in the Field Properties pane.

3
Prevent empty text values

For a required text field, also set Allow Zero Length to No if users must not save an empty string.

4
Save and test

Save the table design, then open the form and try saving a record with a required field blank. Access should prevent the save and display a validation message.

Require the fields in the underlying Access table
Existing records: If Access asks to check existing data, records with missing values may need to be corrected before the new validation rule can be enforced.
Free Microsoft Office alternative

Work with Office documents and spreadsheets in WPS Office

WPS Office is a free, lightweight alternative for everyday documents and spreadsheets, with a familiar interface and Office format compatibility to ease migration. It does not replace Microsoft Access or configure Access database validation.

Use a familiar interface for documents and spreadsheetsOpen and edit Microsoft Word and Excel formats, including DOCX and XLSXOrganize mandatory-entry lists in spreadsheetsMove common Office documents into a lightweight workspace
microsoft office alternative - wps office

Frequently Asked Questions

How do I make an Access field mandatory without writing code?

Open the underlying table in Design View, select the field, and set Required to Yes in Field Properties. For text fields, set Allow Zero Length to No if empty strings should also be rejected.

Why should I use Before Update instead of Before Insert?

The form's Before Update event runs before a new or edited record is saved. Before Insert runs when entry of a new record begins, before the user has had a chance to complete the fields.

Can I display a custom message for a blank control?

Yes. In the form's Property Sheet, open Event > Before Update, create an event procedure, and use MsgBox to display the message. Set Cancel = True to prevent the save.

Will form validation apply to records entered directly in a table?

No. Form event code runs through that form. Set the underlying table field's Required property to enforce the rule when records are entered or edited elsewhere.