delete records using check boxes

Results 1 to 2 of 2

Thread: delete records using check boxes

  1. #1
    Join Date
    Dec 1969

    Default delete records using check boxes

    I want to write out records and set checkboxes by them with an option to delete them. Does anyone know how do this? I am setting up a shopping cart like situation.<BR>Thanks,<BR>Scott<BR>slbrook@hotmail. com

  2. #2
    Sam Otto Guest

    Default RE: delete records using check boxes

    Each checkbox should have the same name. The value of each checkbox should be the unique id of the record to be deleted. When the form is submitted only those checkboxes that are checked are sent to the next page. Since all the checkboxes have the same name, you ask for that one name out of the Request object, getting all the checkboxes values delimited by commas. Use the Split() function to parse the values and then loop through the array deleting each item. Or, if the values are numbers to can just do a <BR><BR>"DELETE FROM Table WHERE ID in (" & Request("CheckboxName") & ")"

Posting Permissions

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