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)

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 string
Null
Null
(not allowed)
NoYesPresses ENTER
Presses SPACEBAR
Enters a zero-length string
Null
Null
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

See Also
  • Create or remove a primary key


Community Additions

Show:
© 2014 Microsoft