moving next recordset

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sexy_shot
    Banned
    New Member
    • Jul 2006
    • 2

    moving next recordset

    hello friends
    i am devloping an application using ms-access database. I want to move next on the recordset.Pleas e send me solution with source code. i am in hurry please send as much as possiable.


    thanks
    sexy shot :)
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Hi there,

    you are developing rite? am sure you done up with a little bit of coding work.. pls send you currently completed code segment to be validated.. we don't send code out just like that.. in here we help users to learn a better way of programming.. take care.. :)

    Comment

    • Ali Rizwan
      Banned
      Contributor
      • Aug 2007
      • 931

      #3
      Originally posted by sexy_shot
      hello friends
      i am devloping an application using ms-access database. I want to move next on the recordset.Pleas e send me solution with source code. i am in hurry please send as much as possiable.


      thanks
      sexy shot :)


      use this code

      private sub()

      Code:
      if data.recordset.eof then
      data.recordset.movefirst
      else
      data.recordser.movenext

      Comment

      • kinnu
        New Member
        • Nov 2006
        • 30

        #4
        For next record

        Private Sub Command1_Click( )
        Data1.Recordset .movenext.MoveN ext
        End Sub

        In the same way for previous record Data1.Recordset .movenext.Movep revious

        For first rec: Data1.Recordset .movenext.Movef irst
        For last rec: Data1.Recordset .movenext.Movel ast

        EOF is end of file and BOF is begin of file.

        So you can code in the following way


        Private Sub Command1_Click( )
        If Data1.Recordset .EOF Then
        MsgBox "last record"
        Else
        Data1.Recordset .MoveNext
        End If
        End Sub

        Comment

        • kinnu
          New Member
          • Nov 2006
          • 30

          #5
          Sorry the above was not properly sent:

          For next record

          Private Sub Command1_Click( )
          Data1.Recordset .movenext
          End Sub

          In the same way for previous record Data1.Recordset .Moveprevious

          For first rec: Data1.Recordset .Movefirst
          For last rec: Data1.Recordset .Movelast

          EOF is end of file and BOF is begin of file.

          So you can code in the following way


          Private Sub Command1_Click( )
          If Data1.Recordset .EOF Then
          MsgBox "last record"
          Else
          Data1.Recordset .MoveNext
          End If
          End Sub

          Comment

          Working...