Results 1 to 3 of 3

Thread: Data Environment????

  1. #1

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    NE United States
    Posts
    62
    I have created a Master/Detail form using the data environment in which I have created a Parent/Child data environment command object. I would like to be able to navigate using command buttons (next record, last record, edit record, add record, etc) but I am not sure how to accomplish this. Can someone offer a suggestion on how to add these buttons for navigation.

    Thanks in advance!

    Austin
    Does it ever get any easier?

  2. #2
    Fanatic Member
    Join Date
    Jan 2001
    Location
    Vietnam
    Posts
    613
    Code:
    Dim rs As ADODB.Recordset
    
    Sub MoveFirst()
        rs.MoveFirst
    End Sub
    
    Sub MoveLast()
        rs.MoveLast
    End Sub
    
    Sub MoveNext()
        rs.MoveNext
        If rs.EOF Then
            rs.MoveLast
        End If
    End Sub
    
    Sub MovePrev()
        rs.MovePrevious
        If rs.BOF Then
            rs.MoveFirst
        End If
    End Sub
    
    Sub AddNew()
        'good to open a new form and add value to text box then
        'save to record set
        rs.AddNew 'add your field and value here
    End Sub
    Regards,
    TheBao

  3. #3

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    NE United States
    Posts
    62

    Thanks BAO

    Thanks so very much for Taking the time to help...you're terrific.
    Does it ever get any easier?

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