Table of contents
TOC
Collapse the table of content
Expand the table of content

The field cannot contain a Null value because the Required property for this field is set to True. Enter a value in this field. (Error 3314)

office 365 dev account|Last Updated: 4/3/2018
|
3 Contributors

Applies to: Access 2013 | Access 2016

In this articleWhat Is a Null?What Is the Required Property?SolutionTo remove the required propertySetting the AllowZeroLength Property

The Required property for this field is set to Yes, prohibiting the entry of a Null or zero-length string (" ") in the field. Enter a value in the field.

What Is a Null?

A Null is a value you can enter in a field or use in expressions or queries to indicate missing or unknown data. In Microsoft Visual Basic, the Null keyword indicates a Null value. Some fields, such as primary key fields, cannot contain Null.

What Is the Required Property?

You can use the Required property to specify whether a value is required in a field. If this property is set to Yes, when you enter data in a record, you must enter a value in the field or in any control bound to the field, and the value cannot be Null. For example, you might want to be sure that a LastName control has a value for each record.

Solution

This problem has the following possible solutions:

  • Enter a value in the field named in the error message.

  • Remove the Required property setting from the field.

  • Use the AllowZeroLength property to allow zero-length strings (" ") to be stored in the field.

To remove the required property

  1. In the Navigation Pane, right-click the name of the table that contains the required field, and then click Design View.

  2. Click the Field Name for the field named in the error message.

  3. Under Field Properties, click the General tab.

  4. In the Required property, click No.

  5. To save your changes, click Save on the Quick Access Toolbar, or press CTRL+S.

Setting the AllowZeroLength Property

You can use the Required and AllowZeroLength properties to differentiate between information that does not exist (stored as a zero-length string (" ") in the field) and information that may exist but is unknown (stored as a Null value in the field). If you set the AllowZeroLength property to Yes, a zero-length string will be a valid entry in the field regardless of the Required property setting. If you set Required to Yes and AllowZeroLength to No, you must enter a value in the field, and a zero-length string will not be a valid entry.

The following table shows the results you can expect when you combine the settings of the Required and AllowZeroLength properties.

RequiredAllowZeroLengthUser's actionValue stored
NoNoPresses ENTER Presses SPACEBAR Enters a zero-length stringNullNull (not allowed)
NoYesPresses ENTER Presses SPACEBAR Enters a zero-length stringNullNull Zero-length string
YesNoPresses ENTER Presses SPACEBAR Enters a zero-length string(not allowed) (not allowed) (not allowed)
YesYesPresses ENTER Presses SPACEBAR Enters a zero-length string(not allowed) Zero-length string Zero-length string

ACCESS SUPPORT RESOURCES
Access for developers forum on MSDN
Access help on support.office.com
Access help on answers.microsoft.com
Search for specific Access error codes on Bing
Access forums on UtterAccess
Access wiki on UtterAcess
Access developer and VBA programming help center (FMS)
Access posts on StackOverflow

© 2018 Microsoft