Results 1 to 3 of 3

Thread: a little help

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Posts
    11

    a little help

    I was just wondering if some one could point me in the right direction ere for a we bit ,

    I am about to start writing a small programme for an exercise in class and I am asked that the user enter in a number via a input box and then you have to compute the average the sum and also out put the highest and lowest number , this all has to be printed to a picture box ,

    also we have to set up an escape character so if you put in -999 it will disbale the input box and the programme will continue I know how to do this via a if loop , also If the user hits the cancel button on the input box it removes what he/she has entered ,

    I am just wondering what code is the best to use would it be a for next loop or should I just go with an if loop I also would not mind a little code example or some example on how the cancel funtion works with the inputbox ,

    thanks in advance

  2. #2

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Posts
    11
    come on people a little help would go along way

  3. #3
    Junior Member
    Join Date
    Aug 2002
    Posts
    22
    actully no really understand your question?

    i don't think you need to worry about the for loop statement i means waste your processing time.
    example.

    while not rs.eof
    do something here

    rs.movenext
    wend

    this code will waste some processtime. cause it need to check the record whether is end of file.

    dim i as long
    dim totalrecord as long
    totalrecord = rs.recordcount

    for i = 1 to totalrecord
    do something here
    rs.movenext
    next

    this code will more faster the the while wend statement.


    Hope can help you.
    might to post your source code here.
    and explain what you want?

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