Consider (with notes)
Code:
Private Sub cmdUpdateNotes_Click()
Dim db As Database
Dim rec As Recordset
Dim sSQL As String
On Error GoTo errHandler
Set db = CurrentDb
Set rec = db.OpenRecordset("Select * from tblWONotes WHERE [SO] = '" & [Forms]![TESTfrmWOList]![txtNoteSO] & "'")
'if both BOF and EOF is true there are no records
If Not (rs.BOF And rs.EOF) Then 'there is at least 1 rec, so UPDATE
sSQL = "UPDATE tblWONotes SET tblWONotes.Notes = '" & [Forms]![FrmWOList]![txtNoteComment] & "'" & _
" WHERE (((tblWONotes.SO)= '" & [Forms]![TESTfrmWOList]![txtNoteSO] & "'));"
Else 'BOF and EOF is true, meaning no records, so APPEND
sSQL = "INSERT INTO tblWONotes (SO, Notes) SELECT '" & [Forms]![TESTfrmWOList]![txtNoteSO] "' AS Expr2, " & _
[Forms]![TESTfrmWOList]![txtNoteComment] & "' AS Expr1 FROM tblWONotes;"
End If
exitHere:
On Error Resume Next
Set db = Nothing
Set rec = Nothing
Exit Sub
errHandler:
msgbox "Error " & err.Number & ": " & err.Description
Resume exitHere
End Sub