Delet contents of a single cell
I am trying to delete a date entry from a form during update using a SQL string. The text says to use an "Empty Value" but never show how to code it. My code works if the field is alreay empty but it will not delete what is already in the field.
strSQL = "UPDATE ServiceRecords SET "
If Request.Form("completed") <> "" Then strSQL = strSQL & "completed = #" & CDate(Replace(Request.Form("completed"), "'", "''")) & "#, "
If Request.Form("serviceda") <> "" Then strSQL = strSQL & "serviceda = #" & CDate(Replace(Request.Form("serviceda"), "'", "''")) & "#, "
strSQL = strSQL & "client = '" & CStr(Replace(Request.Form("client"), "'", "''")) & "', " _
& "tech = '" & CStr(Replace(Request.Form("tech"), "'", "''")) & "', " _
("parts"), "'", "''")) & "', " _
& "comments = '" & CStr(Replace(Request.Form("comments"), "'", "''")) & "' " _
& "WHERE (ID = " & iRecordId & ")"
|