View Single Post
  #2 (permalink)  
Old October 23rd, 2009, 10:46 AM
vb5prgrmr vb5prgrmr is offline
Authorized User
 
Join Date: Mar 2009
Posts: 49
Thanks: 0
Thanked 8 Times in 8 Posts
Default

Code:
Option Explicit
Private Sub List1_Click()
Dim I As Integer, strSQL As String, SS As String
For I = 0 To List1.ListCount - 1
  If List1.Selected(I) = True Then
    SS = List1.List(I)
    Exit For
  End If
Next I
strSQL = "SELECT * FROM tablename WHERE fieldname = '" & SS & "'"
'...
End Sub


Good Luck
Reply With Quote
The Following User Says Thank You to vb5prgrmr For This Useful Post:
biswa (October 23rd, 2009)