Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check Box 1

Status
Not open for further replies.

discusmania

IS-IT--Management
Oct 24, 2000
158
AP
hello guys....

for example i want to delete more than 1 item in the same time, i've to create a check box on each line on records. how to do so that when the user press delete button, all the records that have been checked will be deleted?

Thanks so much

 
Well, you would just go through and check the values of the checkboxes...

If the delete button reloads the page, then all you do is go through and ask:
Code:
if request.form("checkbox1") = "checkedValue" then
  'whatever whatever
end if

Is that what you were looking for?
 
I think the easiest way to do this is to allocate the value of your tables primary key (ie. an Autonumber) to the check box. Then when you submit the form to the page that does the deletion you can use a simple SQL statement that deletes all the items in one go:

for example:

deleteset = Request.Form("delete")

SQL = "DELETE * FROM yourtablename WHERE autonumberID IN("deleteset")"

Hope this makes sense, I have implemented this and it works very well, if you have any questions please contact me.
cheers
simonf
simonf@ozemail.com.au
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top