Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Aug 2003
    Location
    Schenectady, New York, USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Loop Driving Me Nuts

    Ok A little background. I have and Access Database setup with all the refering url's and if they have a length of over 50 characters (I know sloppy filter but from what I've seen generally All search engines end up being well over 50 characters in length). Now I'm trying to generate a quick report that will pull all the urls and and fill a pulldown list.

    <select name="search" onChange='jumpTo(this);'>

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Loop Driving Me Nuts

    When you use a Logical OR, the processor evaluates both conditions. Thus, if you have .EOF, you will get an error on the other condition. You might have to rewrite your loop:

    do until rstmp.eof
    rstmp.movenext
    if tmp <> lcase(left(rstmp("Refer"), 30)) then exit do
    loop

    or something like that.

    Also, if there's any chance that the field will be less than 30 characters, that could be a problem.

  3. #3
    New Lounger
    Join Date
    Aug 2003
    Location
    Schenectady, New York, USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Loop Driving Me Nuts

    Actually, I figured it out finnally.

    I just added these lines inside the do loop

    if rstmp.eof then
    exit do
    end if

    It seemed to work but after re-evaluating the code and database structure I just ended up restructuring the database and re-writing the code.

    Thanks
    Conan

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Loop Driving Me Nuts

    Yup, either of those would have worked.

    And when you solve a problem, please update your post so us volunteers can devote our time to those in greater need. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  5. #5
    New Lounger
    Join Date
    Aug 2003
    Location
    Schenectady, New York, USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Loop Driving Me Nuts

    Ok thanks. i'll make sure I make a note of that for future reference.

    Conan

Posting Permissions

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