Hi everybody
I have a drop down list and I want that the rowsource changes on the fly.
The code written here works perfectly for the dropdownlist but the control itself works not good
When I type "all", the combobox list shows all the items with "all" in it, that's perfect.
When i type "bo", the combobox.Value automaticly shows an item like "boiler" and the combobox list shows all the "boiler" If I need "bottle", I have to delete the letters from boiler" to "bo" and add "ttle"
Sometimes it works, sometimes not.
That's not what I want.
My access is version 2013 in french
Here is my code
It seems that the combobox.Value automaticly selects a Sourcerow.item. Is there a way to avoid this or do you have another way to do this trick ?
I hope you understand the problem and that my english is not stoo bad
I have a drop down list and I want that the rowsource changes on the fly.
The code written here works perfectly for the dropdownlist but the control itself works not good
When I type "all", the combobox list shows all the items with "all" in it, that's perfect.
When i type "bo", the combobox.Value automaticly shows an item like "boiler" and the combobox list shows all the "boiler" If I need "bottle", I have to delete the letters from boiler" to "bo" and add "ttle"
Sometimes it works, sometimes not.
That's not what I want.
My access is version 2013 in french
Here is my code
Code:
Private Sub Modifiable12_Change()
rsql = "SELECT produits.id_produit, produits.description " & _
"FROM produits " & _
"WHERE description Like " & Chr(34) & "*" & Me.Modifiable12.Text & "*" & Chr(34) & _
" ORDER BY description;"
Me.Modifiable12.RowSource = rsql
Me.Modifiable12.RowSourceType = "Table/Query"
Me.Modifiable12.Dropdown
End Sub
It seems that the combobox.Value automaticly selects a Sourcerow.item. Is there a way to avoid this or do you have another way to do this trick ?
I hope you understand the problem and that my english is not stoo bad
