M
Marcos
I am trying to fill a text box based in the selection in a combo box.
It works, but if the combo box has 2 register with the same value in the
first column the text box is always filled with the information related to
the first register.
For instance: using the Northwind database I create a new form, put a combo
box and a text box.
In the row source property of the combo box I put “SELECT [Customers and
Suppliers by City].City, [Customers and Suppliers by City].CompanyName,
[Customers and Suppliers by City].ContactName, [Customers and Suppliers by
City].Relationship FROM [Customers and Suppliers by City] ORDER BY [City],
[CompanyName], [ContactName], [Relationship]â€
And in the control source property of the text box I put =Combo0.column(1)
The error is the following: when there are at least 2 customers from the
same city, the text box always shows the first’s CompanyName. Eg: there are 3
customers from Buenos Aires, it does not matter which of the 3 customers I
select, the company name displayed in the text box is always “Cactus Comidas
para llevar†who is the first customer from Buenos Aires.
Microsoft creates an article (209738) to show how to fill a textbox from a
combobox, but they did not make reference to this “problemâ€.
Is this an Access problem or do I miss something?
Thanks in advance,
Marcos
It works, but if the combo box has 2 register with the same value in the
first column the text box is always filled with the information related to
the first register.
For instance: using the Northwind database I create a new form, put a combo
box and a text box.
In the row source property of the combo box I put “SELECT [Customers and
Suppliers by City].City, [Customers and Suppliers by City].CompanyName,
[Customers and Suppliers by City].ContactName, [Customers and Suppliers by
City].Relationship FROM [Customers and Suppliers by City] ORDER BY [City],
[CompanyName], [ContactName], [Relationship]â€
And in the control source property of the text box I put =Combo0.column(1)
The error is the following: when there are at least 2 customers from the
same city, the text box always shows the first’s CompanyName. Eg: there are 3
customers from Buenos Aires, it does not matter which of the 3 customers I
select, the company name displayed in the text box is always “Cactus Comidas
para llevar†who is the first customer from Buenos Aires.
Microsoft creates an article (209738) to show how to fill a textbox from a
combobox, but they did not make reference to this “problemâ€.
Is this an Access problem or do I miss something?
Thanks in advance,
Marcos