Results 1 to 3 of 3

Thread: Help On MOVE NEXT

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    Singapore
    Posts
    254

    Help On MOVE NEXT

    hi guys

    a simple question..... i created a form WITH link to access DB and i created a button call Next in it i wrote adodc1.recordset.movenext



    then everytime when i press next until the very last and i press again it will give me a EOF OR BOF error pls help

  2. #2
    Frenzied Member swatty's Avatar
    Join Date
    Aug 2002
    Location
    somewhere on earth
    Posts
    1,478
    You have to test on these before doing a
    VB Code:
    1. adodc1.recordset.movenext

    Instead write it like
    VB Code:
    1. if not adodc.recordset.EOF then
    2.      adodc1.recordset.movenext
    3. else
    4.      ' place it back at the beginning if there is one
    5.     if adodc.recordset.recordcount then
    6.          adodc.recordset.movefirst
    7.    end if
    8. end if
    Code:
    If Question = Incomplete Then
       AnswerNextOne
    Else
       ReplyIfKnown
    End If
    cu Swatty

  3. #3
    Fanatic Member kinjalgp's Avatar
    Join Date
    Apr 2000
    Location
    India
    Posts
    535
    Everytime the button is pressed check if adodc.recordset.EOF is true before proceeding further eith the adodc.recordset.movenext

    Kinjal

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