sladerwilson
09-07-2007, 10:20 PM
What about the following code would make it only process the first checkbox value it encounters and no subsequent ones (ie. I check five checkboxes and it only processes the first one it encounters? All the values are showing up as expected when I use response.write arrVals(i) & "<br>" to view the values that are running through the loop.... it just won't update all of them... only the first one it comes to.
arrVals = split(Request.Form ("chkBox"), ",")
'loop through the checkboxes which were ticked
FOR i = 0 to ubound(arrVals)
'Update the Category Code for the items selected
objRst.Open "UPDATE MyDatabase SET Field1 = '"& strCatCode &"' WHERE Field2 = '"& arrVals(i) &"' "
response.write arrVals(i) & "<br>"
NEXT
arrVals = split(Request.Form ("chkBox"), ",")
'loop through the checkboxes which were ticked
FOR i = 0 to ubound(arrVals)
'Update the Category Code for the items selected
objRst.Open "UPDATE MyDatabase SET Field1 = '"& strCatCode &"' WHERE Field2 = '"& arrVals(i) &"' "
response.write arrVals(i) & "<br>"
NEXT