I have a form which user pulls in records.. I also have a button to where the user can update the record.. This works fine as long as there is something being updated..
The problem is When i pull the record and say I want to delete whatever is in the field leaving it blank. then update it to have a blank field. That doesnt work.. When i clear out the field and hit update.. it says its updated but.. i go into my table and the field that I try to leave empty is still there.. I can update it as long as there is something replaced.. but if I leave it blank.. then it doesnt update...
heres the code
Private Sub Command27_Click()
Dim f1 As String
Dim f2 As String
Dim f3 As String
Dim strsql As String
Select Case MsgBox("Are you sure you would like to UPDATE?" & vbCrLf & vbLf & " Yes: Updates Record" & vbCrLf & " No: Does NOT Update Record" & vbCrLf & " Cancel: Reset (Undo) Changes" & vbCrLf, vbYesNoCancel + vbQuestion, "Clicking UPDATE will ERASE all old information!")
Case vbYes: 'Updates the changes
f1 = ControlNo.Text
f2 = strProject.Text
f3 = strArea.Text
strsql = "UPDATE * WHERE tblQR.ControlNo = '" & f1 & "'"
Case vbNo: 'Do not delete or undo
Case vbCancel: 'Undo the changes
Me.tbProperSave.Value = "No"
Case Else: 'Default case to trap any errors