Results 1 to 3 of 3

Thread: Which control was clicked?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Posts
    230

    Question

    I have a form with two flexgrids on it. When either of them is double clicked, I want to bring up one form(the same form is for both grids) and know which was clicked. Is there awat to do this, aside from a control array.

    I want something like this

    [code]

    sub grid1_dblclick ()
    frm1.show
    end sub

    sub grid2_dblclick ()
    frm1.show
    end sub

    frm1_load ()
    'determine which grid was clicked and process information
    end sub

    any ideas?

    Shawn Hull
    VB6, SP3 (Professional Edition)

  2. #2
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197
    Code:
    Private Sub grid1_dblclick ()
    Call LoadFrm("grid1")
    end sub
                             
    Private Sub grid2_dblclick ()
    Call LoadFrm("grid2")
    end sub
    
    Private Sub LoadFrm(strS As String)
    Load frm1
    'tell the form that str was what was clicked
    Form1.Text1.Text = strS
    End Sub
    retired member. Thanks for everything

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Posts
    230

    Talking Thanks....

    I never thought of doing it that way, but I like it.

    Shawn Hull
    VB6, SP3 (Professional Edition)

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