Update box with combo box

J

Jose Lopes

This is quite simple I know, but I only get my hands on Access whenever I
need it so I’m always forgetting simple tasks like this one. I even had some
trouble choosing this question’s title, can you imagine it? :/

I have two tables, ORDERS and PRODUCTS.

My ORDERS form has a combo box where I can pick the PRODUCT code from the
PRODUCTS table but I also want to see the PRODUCT_NAME (PRODUCTS table) field
on this form in a different box.

Thx in advance.
 
A

Al Campagna

Jose,
Make your combo a 2 column combo, with the associated ProductName
in the second column. (ex. cboProductCode)
NoOfCols = 2
ColWidths = 1"; 1" (or whatever)
Place an unbound text control on your form, with a Control Source of...
= cboProductCode.Column(2)
(combo columns are numbered left to right 1, 2, 3, 4, etc...)
Whenever a ProductCode is selecetd in the combo, the text control will
"display" the associated ProductName.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
R

RonaldoOneNil

Include the product name in the combo box. You can display it or not by
seting its column width to 0. In the control source of your other box, you
can then put
=[ComboBoxName].Column(1)

Adjust the name and column number to match your combo box.
 

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