Symptoms
When you attempt to add a new record to a recordset, the Data Access Objects (DAO) Recordset Update method may fail silently when the following conditions are met: The Recordset is based on a query that joins two tables.The table being updated has a Required field enforced by a Primary Key or Unique Index.No values are supplied for any of the fields in the Recordset.
Resolution
To work around this problem, use either of the following methods: If the joined table is unnecessary, remove the joined table from the query. Doing this causes the 3314 error to fire as expected. To remove the joined table:
Open the database in Microsoft Access.Open the query in Design View.Delete the unnecessary table from the query.Save and close the query.Prior to calling the Update method, write code that checks to ensure that a value is supplied for all fields in the table where the Required Value property is set to Yes. For example, if you are using text boxes on a form for data entry and you have a text box named txtSSN and a required field in the table named SSN, check the Text property of the txtSSN text box prior to calling the Update method to ensure it contains a value as follows:
If Trim(txtSSN.Text) = “” ThenMsgBox “The SSN field is Required. You must supply a valid SSN.”txtSSN.SetFocusExit Sub End If Prior to calling the Update method, write code that checks to ensure that a value is supplied for all fields in the table where the Required Value property is set to Yes. For example, if you are using text boxes on a form for data entry and you have a text box named txtSSN and a required field in the table named SSN, check the Text property of the txtSSN text box prior to calling the Update method to ensure it contains a value as follows:
If Trim(txtSSN.Text) = “” ThenMsgBox “The SSN field is Required. You must supply a valid SSN.”txtSSN.SetFocusExit Sub End If