Results 1 to 4 of 4

Thread: subscript out of range

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2000
    Location
    bebenia, PA, USA
    Posts
    241
    subscript out of range error using vb and sql is usually caused by?????

    Help

    Thanks!!!

  2. #2
    Guest
    too many items in an array


  3. #3
    Hyperactive Member barrk's Avatar
    Join Date
    Sep 2000
    Location
    My own little world
    Posts
    274

    Cool Hope this helps.

    I usually get this error when I've farkled up my loops.

    If you are looping through your array (or recordset) and there are ten items in it. You need to reference for n = 0 to 9 or for n = 1 to 10. n refers to the index number. If you say for n = 0 to 10, it tries to loop through more times than you have elements in your array.

    I'm sure there are more reasons why you may get this error but this is my most common.

  4. #4
    Guest
    Or this piece of code would also give error 9:

    Dim arrValues() as string
    x = arrValues(0)



Posting Permissions

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



Click Here to Expand Forum to Full Width