Deleting record using checkbox

Results 1 to 2 of 2

Thread: Deleting record using checkbox

  1. #1
    Nikolas van Etten Guest

    Default Deleting record using checkbox

    How can I do this? I want to be able to delete a record by checking a checkbox and clicking a Delete button. All code should be in the same page. Hotmail is using this...<BR>I want to give the checkboxes names using the record&#039s ID.<BR>Appreciate all answers!<BR><BR>Nick

  2. #2
    Join Date
    Dec 1969

    Default RE: Deleting record using checkbox

    &#039Collect the value from the user&#039s checkbox named DeleteJob<BR>strDeleteJob = Request.Form("DeleteJob")<BR><BR>&#039Create your recordset including all values from the table that <BR>&#039you want to update/delete<BR><BR>strSQL = "SELECT * FROM " &#039etc<BR>Set rs = Server.CreateObject("ADODB.Recordset")<BR>rs.Open strSQL, con, adOpenDynamic, adLockOptimistic<BR><BR>&#039If the user checked the DeleteJob checkbox, the current record &#039should be deleted<BR>If strDeleteJob = 1 then<BR> rs.Delete <BR> rs.Update<BR>End If<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts