The code shown below returns the error listed in the subject line. BUT when I test to see if the recordset is updatable the code returns TRUE.
TIA
Jeff
Dim ssql As String
Dim db As Database
Set db = CurrentDb
Dim rs As DAO.Recordset
ssql = "SELECT tbl_mill_qc_tests.index AS testindex, tbl_mill_qc_tests.*, tbl_mill_qc_test_names.tst_name_1, tbl_mill_qc_test_names.tst_name_2, tbl_mill_qc_test_names.tst_name_3, tbl_mill_qc_test_names.tst_name_4, tbl_mill_qc_test_names.tst_name_5, tbl_mill_qc_test_names.tst_name_6, tbl_mill_qc_test_names.tst_name_7 FROM tbl_mill_qc_test_names INNER JOIN tbl_mill_qc_tests ON tbl_mill_qc_test_names.index = tbl_mill_qc_tests.name_id WHERE (((tbl_mill_qc_tests.index)= " & Me.OpenArgs & "));"
Set rs = db.OpenRecordset(ssql)
If rs.EOF And rs.BOF Then
'NO RECORD NEED TO ADD A RECORD THEN SYNC INDEX
rs.AddNew
rs.Update
rs.MoveLast
rs.Edit
msgbox rs.updatable <<< this returns TRUE
rs!index = Me.OpenArgs <<< error here
rs.Update
Else
End If
rs.Close
Set rs = Nothing
TIA
Jeff
Dim ssql As String
Dim db As Database
Set db = CurrentDb
Dim rs As DAO.Recordset
ssql = "SELECT tbl_mill_qc_tests.index AS testindex, tbl_mill_qc_tests.*, tbl_mill_qc_test_names.tst_name_1, tbl_mill_qc_test_names.tst_name_2, tbl_mill_qc_test_names.tst_name_3, tbl_mill_qc_test_names.tst_name_4, tbl_mill_qc_test_names.tst_name_5, tbl_mill_qc_test_names.tst_name_6, tbl_mill_qc_test_names.tst_name_7 FROM tbl_mill_qc_test_names INNER JOIN tbl_mill_qc_tests ON tbl_mill_qc_test_names.index = tbl_mill_qc_tests.name_id WHERE (((tbl_mill_qc_tests.index)= " & Me.OpenArgs & "));"
Set rs = db.OpenRecordset(ssql)
If rs.EOF And rs.BOF Then
'NO RECORD NEED TO ADD A RECORD THEN SYNC INDEX
rs.AddNew
rs.Update
rs.MoveLast
rs.Edit
msgbox rs.updatable <<< this returns TRUE
rs!index = Me.OpenArgs <<< error here
rs.Update
Else
End If
rs.Close
Set rs = Nothing