Combo box item selesction

T

Terrance1990

i have a combo box correctly showing the values of a query,

what i want it to do is that when an item is selected, make that the value
of the combo box and change the value of two text boxes.

in order to get it to display a list i linked it to a query so that when the
table is changed, so is what the combo box displays.
 
T

Tom van Stiphout

On Thu, 7 May 2009 00:34:05 -0700, Terrance1990

The classic solution is to have the combobox have the extra
information in hidden columns. As an example let's say we have an
Employee dropdown (cboEmployees) with a hidden EmpID and a visible
FullName column. We want two textboxes with their Phone and Email. To
do this change the query for the combobox to include two more columns:
select EmpID, FullName, Phone, Email from Employees
Set ColumnCount to 4, ColumnWidths to "0;1;0;0".
In the textboxes set the ControlSource to:
=cboEmployees.Column(2)
and
=cboEmployees.Column(3)
respectively.

-Tom.
Microsoft Access MVP
 
T

Terrance1990

This was helpful in relation to the text boxes, however, i cannot select an
item in the combo box.

Access tells me that "this control can't be edited; its bound to the
expression:"

What i want is for the combo box to alter a value in a record other than
where it gets the data its showing. Is this even possible?

It is showing an ID, Name and surname, and i want it to put the selected ID
into the second table and have the box display that value when looking
through other records.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top