C
Celfreak
For a combo box I use a sql statement as basis.
SELECT Klanten.Bedrijf FROM Klanten ORDER BY Klanten.Bedrijf;
When I using the form, the list goes automatically to the name with the
(first) letters you type in the box. My problem is the list is getting bigger
and bigger, so I want to search in my combobox.
In SQL you can use the Where statement to narrow down the choices. For example
SELECT Klanten.Bedrijf FROM Klanten WHERE Klanten.Bedrijf Like '*BV*' ORDER
BY Klanten.Bedrijf; narrows down the list of the combobox the the values with
BV in their name.
This is a static statement and i want to make it more dynamic. What I want
is to have a (independent) field where you type your searchword that is used
by the combobox to narrow down the list. I tried many things, only I cannot
connect a field to the SQL statement.
What works is voor example
SELECT Klanten.Bedrijf FROM Klanten WHERE Klanten.Bedrijf Like '*'&
searchword &'*' ORDER BY Klanten.Bedrijf
I then get the message give parameter. Problem with this is that I cannot
change that parameter.
SELECT Klanten.Bedrijf FROM Klanten ORDER BY Klanten.Bedrijf;
When I using the form, the list goes automatically to the name with the
(first) letters you type in the box. My problem is the list is getting bigger
and bigger, so I want to search in my combobox.
In SQL you can use the Where statement to narrow down the choices. For example
SELECT Klanten.Bedrijf FROM Klanten WHERE Klanten.Bedrijf Like '*BV*' ORDER
BY Klanten.Bedrijf; narrows down the list of the combobox the the values with
BV in their name.
This is a static statement and i want to make it more dynamic. What I want
is to have a (independent) field where you type your searchword that is used
by the combobox to narrow down the list. I tried many things, only I cannot
connect a field to the SQL statement.
What works is voor example
SELECT Klanten.Bedrijf FROM Klanten WHERE Klanten.Bedrijf Like '*'&
searchword &'*' ORDER BY Klanten.Bedrijf
I then get the message give parameter. Problem with this is that I cannot
change that parameter.