do while loop question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Darin

    #1

    do while loop question

    i have a do while loop that within it has a select statement. Some of
    the items are done some of the times, others are done all the time.

    I would like either:

    Do while not_done
    if quick and mid(file,1,2)<> 'SO' then
    next do
    end if

    select case
    end select
    Loop

    OR

    Do while not_done
    select case
    case "ARCust" and not quick
    case "SOOrder"
    case "ICItem" and not quick
    end select
    Loop

    Are either of these (or something very similar possible or do i need to
    do additional IF statements?

    Darin

    *** Sent via Developersdex http://www.developersdex.com ***
  • Michel Posseth  [MCP]

    #2
    Re: do while loop question


    Hint :

    Continue


    ;-)


    regards
    Michel Posseth [MCP]





    "Darin" <darin_nospam@n ospameverschree f in bericht
    news:%23a0xFg$I JHA.5088@TK2MSF TNGP04.phx.gbl. ..
    >i have a do while loop that within it has a select statement. Some of
    the items are done some of the times, others are done all the time.
    >
    I would like either:
    >
    Do while not_done
    if quick and mid(file,1,2)<> 'SO' then
    next do
    end if
    >
    select case
    end select
    Loop
    >
    OR
    >
    Do while not_done
    select case
    case "ARCust" and not quick
    case "SOOrder"
    case "ICItem" and not quick
    end select
    Loop
    >
    Are either of these (or something very similar possible or do i need to
    do additional IF statements?
    >
    Darin
    >
    *** Sent via Developersdex http://www.developersdex.com ***

    Comment

    • Darin

      #3
      Re: do while loop question

      i knew i just had to be missing it. thanks.

      Darin

      *** Sent via Developersdex http://www.developersdex.com ***

      Comment

      • Scott M.

        #4
        Re: do while loop question

        Also, you probably don't want "And", you most likely want "AndAlso".

        Beleive it or not, "And" will still evaulate the right hand portion of a
        test, even when the left hand portion is false.

        -Scott

        "Darin" <darin_nospam@n ospameverwrote in message
        news:eMTvn1AJJH A.456@TK2MSFTNG P06.phx.gbl...
        >i knew i just had to be missing it. thanks.
        >
        Darin
        >
        *** Sent via Developersdex http://www.developersdex.com ***

        Comment

        Working...