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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i wan to loop through every checkbo

Status
Not open for further replies.

vintl

Technical User
Jun 9, 2000
72
0
0
MY
i wan to loop through every checkbox and able to delete as many check box that are checked. but the code shown only limit to 3 checkbox. how can i delete all the checked box?

if cancel = "Delete" then
If request("Cancel1") = "" then Cancel1 = 0 else Cancel1 = request("Cancel1")end if
If request("Cancel2") = "" then Cancel2 = 0 else Cancel2 = request("Cancel2")end if
If request("Cancel3") = "" then Cancel3 = 0 else Cancel3 = request("Cancel3")end if
cancelSQL = "Delete FROM reserve WHERE ((reserve.RID)='"& Cancel1 &"') OR ((reserve.RID)='"& Cancel2 &"') OR ((reserve.RID)='"& Cancel3 &"')"
DBConn.Execute (cancelSQL)
end if
 
The code shown only limit to delete 3 listed checkbox.
I would like it to be able to delete not only 3 checkbox, but all listed checkbox.
 
The code shown only limit to delete 3 listed checkbox.
I would like it to be able to delete not only 3 checkbox, but all listed checkbox. it means it will loop thru all the data from the DB and each have a checkbox can be checked to delete.
 
To do a loop do the following...

This will loop "5" times..

<%

For i=1 to 5
' do whatever in loop


Next

%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top