Results 1 to 5 of 5

Thread: ListView "onclick" for items -- [RESOLVED]

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Location
    california
    Posts
    245

    ListView "onclick" for items -- [RESOLVED]

    Hi,

    I want to call a sub when the user clicks on an item in the ListView. How?

    Thanks for any help

    - Jake
    Last edited by sequoyan; Nov 3rd, 2002 at 10:21 PM.

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Try the ItemClick event.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Location
    california
    Posts
    245
    Thanks!

  4. #4
    Junior Member
    Join Date
    Apr 2002
    Location
    Michigan
    Posts
    27

    How 'bout this?

    This is what I use in a program I am designing right now, (record#) is the index from my database.
    this code is in the listview itself and it takes you to another form and sets the current recordset to the double clicked record#.
    HOPE THIS HELPS YOU.

    Code:
    Private Sub ListView2_DblClick()
    Form1.Data1.Recordset.MoveFirst
    Dim si As String
    si = ListView2.SelectedItem
    Form2.Data1.Recordset.Index = "record#"
    Form2.Data1.Recordset.Seek "=", (si)
    Form2.Show
    Unload Form1
    End Sub
    Rj

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Location
    california
    Posts
    245
    thanks rjcarroll

    that's cool, and exactly (well almost) what I was looking for..

    - Jake

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