Getting very close to getting this to work. I am getting a Type Mismatch
Error, if I select a valid problem, works great if I select a problem not
listed.
Dim ArrP(3) '=Problems
arrP(1) = "TOWER"
arrP(2) = "MONITOR"
arrP(3) = "KEYBOARD"
Dim booP
booP = False
Dim intP
Dim strP
Dim arrQ(3) '=Questions
arrQ(1) = "Is it broke?"
arrQ(2) = "Type of hardware?"
arrQ(3) = "Any other info?"
Dim arrX(3) '=Problem/Questions
arrX(1) = "1,2,3"
arrX(2) = "2,3"
arrX(3) = "1,3"
Dim arrY
Dim intY
Dim strY
Dim Problem
Problem = request.form("cmdProblem")
For intP = 1 to UBound(arrP)
if arrP(intP) = Problem then
booP = true
exit for
end if
next
if booP then
arrY = Split(arrX(inpP), ", ")
strY = "Please answer the following questions about your '"
**** Getting it on this line
strY = strY & arrP(Problem) & "' problem: " & vbCrLF
*****
for intY = 0 to UnBound(arrY)
strY = strY & vbCrLF & arrQ(arrY(intY))
next
Response.write (strY)
else
response.write ("Invalid Problem (" & Problem & ")")
end if
%>
[quoted text, click to view] "McKirahan" <News@McKirahan.com> wrote in message
news:eLqdne5VY4NPbu3fRVn-jg@comcast.com...
> "dthmtlgod" <dvan@hotmail.com> wrote in message
> news:enniaz$SFHA.1148@tk2msftngp13.phx.gbl...
> > Wow, thank you for this, I will give it a try. I should be able to
figure
> > this out. I am horrible with arrays though.
> >
> > What does the booP variable accomplish?
>
> I use hungarian notation (sort of) for variable name prefixes:
>
> obj = object
> int = integer (well, numeric anyway)
> str = string
> boo = boolean (i.e. True/False)
>
> booP (if True) indicates that the Problem was found in arrP().
>
>