megatronixs
Registered User.
- Local time
- Today, 12:39
- Joined
- Aug 17, 2012
- Messages
- 719
Hi all,
I was wondering if it is possible to click on individual parts of a list box selection.
In the below code, I run a query from a button that is on top of a list box row headers. Would it be possible to click on one of the columns and have the same effect? After several hours of google I got the below code, but I would like to avoid the buttons
Greetings.
I was wondering if it is possible to click on individual parts of a list box selection.
In the below code, I run a query from a button that is on top of a list box row headers. Would it be possible to click on one of the columns and have the same effect? After several hours of google I got the below code, but I would like to avoid the buttons
Code:
Private Sub btn_account_1_Click()
Dim strCol4 As String
Dim where As String
strCol4 = ListSearch.Column(3)
If strCol4 <> "" Then
where = "WHERE account_no1 LIKE '*" & strCol4 & "*' OR account_no2 LIKE '*" & strCol4 & "*' OR account_no3 LIKE '*" & strCol4 & "*' " & _
"OR account_no4 LIKE '*" & strCol4 & "*' OR account_no5 LIKE '*" & strCol4 & "*' "
End If
Me.ListSearch.RowSource = Replace(BASE_SQL, "<whereclause>", where)
End Sub
Greetings.