Hi SQL gurus,I have a form that depending on the outcome, will either add, update or delete a record. 1) If there IS NO record of "this" and "that" and Request("x") <> "" it will add a new record.2) If there IS a record for "this" and "that" and Request("x") <> "" it will update column 1,2,3 or 4.3) If there is a record for "this" and "that" and Request("x") = "" it will delete the record.My problem is if there is a value in request("1") it works fine, but if there is no value in ("1") and there is a value in 2, 3, or 4 it will delete the record.If request("1") <> "" OR request("2") <> "" OR request("3") <> "" OR request("4") <> "" Then sSQL = "SELECT * FROM some_column WHERE this = '" & request("this) & "' and that = '" & request("that) & "'" oRS.Open sSQL,oConn,adOpenKeySet,adLockOptimisticIf oRS.EOF ThenoRS.AddnewoRS.Fields("this") = request("this")ors.Fields("that") = request("that")Elseors.MovefirstEnd IfoRS.fields("1") = request("1")oRS.fields("2") = request("2")oRS.fields("3") = request("3")oRS.fields("4") = request("4")oRS.UpdateoRS.Close Else sSQL = "Delete from some_table Where this = '" & '" & request("this) & "' & "' AND that = '" & '" & request("that) & "' & "'"objCmd.ActiveConnection = oConnobjCmd.CommandType = adCmdTextobjCmd.CommandText = sSQLobjCmd.Execute End ifHope I explained that okay.