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

Applies to: Access 2013 | Access 2016

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.

Note

Interested in developing solutions that extend the Office experience across multiple platforms? Check out the new Office Add-ins model. Office Add-ins have a small footprint compared to VSTO Add-ins and solutions, and you can build them by using almost any web programming technology, such as HTML5, JavaScript, CSS3, and XML.

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?

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.

Set the AllowZeroLength property

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.

Required AllowZeroLength User's action Value stored
No No Presses ENTER Presses SPACEBAR Enters a zero-length string Null Null (not allowed)
No Yes Presses ENTER Presses SPACEBAR Enters a zero-length string Null Null Zero-length string
Yes No Presses ENTER Presses SPACEBAR Enters a zero-length string (not allowed) (not allowed) (not allowed)
Yes Yes Presses ENTER Presses SPACEBAR Enters a zero-length string (not allowed) Zero-length string Zero-length string

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.