megatronixs
Registered User.
- Local time
- Today, 23:29
- Joined
- Aug 17, 2012
- Messages
- 719
Hi all,
I made a search tab where I use SQL query to populate a listbox with what I type in a text box. I works great, but if there is text that starts with a "#" then it will not show this example: #AA.
I need to copy the first and second row into clipboard to paste it into a word document. And it should combine both into one text.
I can only copy the column that is set in the "Bound Column" (it is set to 1, if I change it to 2, then I can copy the second on)
This is the code I use for the search box and listbox:
Any idea how to get this done?
Greetings.
I made a search tab where I use SQL query to populate a listbox with what I type in a text box. I works great, but if there is text that starts with a "#" then it will not show this example: #AA.
I need to copy the first and second row into clipboard to paste it into a word document. And it should combine both into one text.
I can only copy the column that is set in the "Bound Column" (it is set to 1, if I change it to 2, then I can copy the second on)
This is the code I use for the search box and listbox:
Code:
Option Compare Database
Option Explicit
Private Const BASE_SQL As String = _
"SELECT ind_prod, description, prod_code " & _
"FROM tbl_prod_description " & _
"<whereclause>" & _
"ORDER BY prod_code;"
Private Sub Search_Change()
' This event fires for every keystroke in the textbox
Dim where As String
If Me.Search.Text <> "" Then
where = "WHERE ind_prod LIKE '*" & Me.Search.Text & "*' "
End If
Me.ListSearch.RowSource = Replace(BASE_SQL, "<whereclause>", where)
End Sub
Any idea how to get this done?
Greetings.