+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
Web Development Thread, ASP If Statement not working? in Coding and Web Development; im about ready to throw asp out the window, chuck out all my toys and go home. im now getting ...
  1. #16
    Flakes's Avatar
    Join Date
    Nov 2009
    Location
    Newcastle
    Posts
    476
    Thank Post
    38
    Thanked 74 Times in 48 Posts
    Rep Power
    28
    im about ready to throw asp out the window, chuck out all my toys and go home.

    im now getting this error:

    Microsoft VBScript compilation error '800a0400'

    Expected statement

    /toner/process_room.asp, line 94

    End if
    which concerns this bit of my code (changed to a case statement btw):

    Code:
      if fault = "true" Then
        For Each item In tonerColour
        Select case item
          case "black"
            rsAddRoom.fields("faultyblack") = rsAddRoom("faultyblack") + 1
          case "cyan"
            rsAddRoom.fields("faultycyan") = rsAddRoom("faultycyan") + 1
          case "megenta"
            rsAddRoom.fields("faultmegenta") = rsAddRoom("faultmegenta") + 1
          case "yellow"
            rsAddRoom.fields("faultyellow") = rsAddRoom("faultyellow") + 1
        End Select
      End if

  2. #17

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,417
    Thank Post
    644
    Thanked 965 Times in 665 Posts
    Blog Entries
    2
    Rep Power
    328
    End your for-each block

    You've closed the select, and the if, but not the foreach.

  3. Thanks to webman from:

    Flakes (29th March 2010)

  4. #18
    Flakes's Avatar
    Join Date
    Nov 2009
    Location
    Newcastle
    Posts
    476
    Thank Post
    38
    Thanked 74 Times in 48 Posts
    Rep Power
    28
    Quote Originally Posted by webman View Post
    End your for-each block

    You've closed the select, and the if, but not the foreach.
    i love you lol thanks, think ive been staring at this code too long.



SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Multiple Values In Case KixStart Statement
    By DaveP in forum How do you do....it?
    Replies: 2
    Last Post: 14th January 2009, 05:39 PM
  2. CV personal statement section
    By ITWombat in forum Educational IT Jobs
    Replies: 16
    Last Post: 17th June 2008, 07:35 AM
  3. Best Mission Statement Words
    By blackcat in forum General Chat
    Replies: 10
    Last Post: 22nd December 2007, 11:30 AM
  4. Vision Statement
    By paulpmp4 in forum Virtual Learning Platforms
    Replies: 5
    Last Post: 29th October 2007, 11:50 AM
  5. Excel IF statement maybe VB
    By danIT in forum General Chat
    Replies: 1
    Last Post: 5th January 2007, 01:12 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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