|
-
Nov 3rd, 2002, 08:01 PM
#1
Thread Starter
Addicted Member
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.
-
Nov 3rd, 2002, 08:38 PM
#2
Try the ItemClick event.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Nov 3rd, 2002, 10:20 PM
#3
Thread Starter
Addicted Member
-
Nov 3rd, 2002, 10:24 PM
#4
Junior Member
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
-
Nov 3rd, 2002, 10:35 PM
#5
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|