Greets,
I have a form with many tick boxes. Example names for these are... tckERD023_USQ_MOD1_0023, tckERT023_USQ_MWD1_0223....
When I use..
for each Item in Request.Form
[boring code goes here]
next
the order the tick boxes are processed looks random. I want to look at each tick box from 1st to last like they are ordered on the form.
How do I control this? Can I control the order?
Please help....My code is below. I'm creating a text file from the form details.
for each Item in Request.Form
if request.Form(Item) = "Yes" then
Pos1 = instr(item, "_" '1st Underscore
pos2 = pos1 + instr(right(item,len(item)-pos1),"_" ' 2nd underscore
pos3 = len(item)-5 ' 3rd underscore
CourseCode = mid(item,4,pos1-4)
CourseName = mid(item,pos1+1,pos2-pos1-1)
ModuleName = mid(item,pos2+1,pos3-pos2)
tPrice = cint(right(item,4))
tTotal=tTotal+tPrice
' write course name
if tTemp<>CourseName then
tApply = tApply & vbcrlf & CourseName & vbcrlf
end if
tApply = tApply & " " & CourseCode & " - " & ModuleName & " $" & tprice & vbcrlf
tTemp= CourseName
end if
next
I have a form with many tick boxes. Example names for these are... tckERD023_USQ_MOD1_0023, tckERT023_USQ_MWD1_0223....
When I use..
for each Item in Request.Form
[boring code goes here]
next
the order the tick boxes are processed looks random. I want to look at each tick box from 1st to last like they are ordered on the form.
How do I control this? Can I control the order?
Please help....My code is below. I'm creating a text file from the form details.
for each Item in Request.Form
if request.Form(Item) = "Yes" then
Pos1 = instr(item, "_" '1st Underscore
pos2 = pos1 + instr(right(item,len(item)-pos1),"_" ' 2nd underscore
pos3 = len(item)-5 ' 3rd underscore
CourseCode = mid(item,4,pos1-4)
CourseName = mid(item,pos1+1,pos2-pos1-1)
ModuleName = mid(item,pos2+1,pos3-pos2)
tPrice = cint(right(item,4))
tTotal=tTotal+tPrice
' write course name
if tTemp<>CourseName then
tApply = tApply & vbcrlf & CourseName & vbcrlf
end if
tApply = tApply & " " & CourseCode & " - " & ModuleName & " $" & tprice & vbcrlf
tTemp= CourseName
end if
next