Hi Guys,
when i type a value in the textbox, the delete button has to delete all the records related to the textbox value in the table. How to do this delete button click. Appreciate for your help guys.
Hi Guys,
when i type a value in the textbox, the delete button has to delete all the records related to the textbox value in the table. How to do this delete button click. Appreciate for your help guys.
Execute a delete query that uses the textbox in the criteria nn
Hi
used above code, and its deletes every records in the table.Code:If MsgBox("Do you wish to delete this record?", vbYesNo, "Delete Confirmation") = vbYes Then If MsgBox("Are you SURE you want to delete this record?" & vbCrLf & _ "This will permanently delete the record.", vbYesNo, "2nd Delete Confirmation") = vbYes Then CurrentDb.Execute "DELETE * FROM [TableName] WHERE [FieldName] = '" & Me.TextBox0 & "';" MsgBox "Records Of Semester " & Me.TextBox0 & " Deleted Successfully" End If End If
Thread is marked solved; is it? If not, use this to see the finished SQL:
http://www.baldyweb.com/ImmediateWindow.htm
your code should only delete records meeting the criteria.