|
 |
aspx_beginners thread: Using Select Case
Message #1 by "Jacobson, John" <jacobs35@c...> on Mon, 19 Feb 2001 15:46:05 -0500
|
|
Im trying to write some code to response write some information using a case
statement to allow for different depending on the critera for the origional
query. how do i make the cases work if i need to do somthing like the
following:
Case
""WO("pend")IS NOT NULL and WO("Outby")="Nobody"""
Response.Write "<a href=/work/change.asp?ID=" & WO("ID") & ">" & "WO
#" & WO("ID") &"</a>" & "" & WO("Date") &" "& WO("Person") & "from" &
WO("Department") & "--This PENDING Work Order Needs To Be Completed" &""
Is this possible, and if so what should i be looking to call the case. Or
should i be using IF Then statements?
the three other variations of the above (Is NULL, or >< Nobody) are my
other cases.
thanks in advance
/john
Message #2 by John Pirkey <mailjohnny101@y...> on Mon, 19 Feb 2001 14:18:19 -0800 (PST)
|
|
The Select Case structure should be used when you want to check a single variable
for multiple values. Your need is actually checking multiple variables (or
combinations of variables), so I would suggest using an If block for each variable
you want to check. If, for each variable there are multiple options, then you can
have a series of cases, but each case should only check one variable.
hope this helps,
john
|
|
 |