Results 1 to 3 of 3

Thread: CASE

  1. #1
    Join Date
    Dec 1969

    Default CASE

    &nbsp;<BR>Im using the following code to add a certain image depending on a series of 4 check boxes:<BR><BR>&#060;%<BR>subjectarea = rs("subjectarea")<BR><BR>Select Case subjectarea<BR><BR>Case "DSL" <BR>Response.Write ("&#060;img src=""../test/DSL.gif""&#062; ")<BR><BR>Case "cable" <BR>Response.Write ("&#060;img src=""../test/cable.gif""&#062; ")<BR><BR>Case "fibre" <BR>Response.Write (" &#060;img src=""../test/fibre.gif""&#062; ")<BR><BR>Case "fixedwireless" <BR>Response.Write ("&#060;img src=""../test/fixedwireless.gif""&#062; ")<BR><BR>End Select<BR>%&#062;<BR><BR>The problem is that sometimes there could be 2, 3, or 4 check boxes checked and therefore I need more than 2, 3 or 4 images to show up. The check box sends the value of the subject area to the database (eg. DSL, wireless)

  2. #2
    Duc Guest

    Default RE: CASE

    What you have to do is<BR>playing a round with the mid() String function to extract your informationfirst. I hope this would help.<BR>Duc

  3. #3
    Join Date
    Dec 1969

    Default Not at CASE problem???

    If more than one check box is checked, then doesn&#039t your query return more than one record?<BR><BR>So don&#039t you want to simply put that CASE statement inside your DO WHILE NOT RS.EOF loop and then it all happens automatically?<BR><BR>I think you need to show us more code if that is *not* the situation. Or did you simply forget about the fact that you needed to loop for the multiple records?<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts