Results 1 to 3 of 3

Thread: Data control

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Calgary Alberta
    Posts
    359

    Post

    I don't use data bound controls very often and this one just about never. My question is simple:

    Is there a way to capture which of the 4 buttons they clicked? The MoveFirst, MovePrevious, MoveNext and MoveLast buttons?

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Try the Validate Event of the Data Control, it returns an Action Parameter which Tells you what Operation was Performed, ie.
    Code:
    Private Sub Data1_Validate(Action As Integer, Save As Integer)
        If Action = vbDataActionMoveFirst Then
            Caption = "MoveFirst"
        ElseIf Action = vbDataActionMovePrevious Then
            Caption = "MovePrevious"
        ElseIf Action = vbDataActionMoveNext Then
            Caption = "MoveNext"
        ElseIf Action = vbDataActionMoveLast Then
            Caption = "MoveLast"
        End If
    End Sub

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Calgary Alberta
    Posts
    359

    Post

    Thanks. I really need to get a new VB help disk :-)

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