From: Jose Lopes on
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.
From: Al Campagna on
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."

"Jose Lopes" <JoseLopes(a)discussions.microsoft.com> wrote in message
news:54692F84-267B-4591-BB39-33BB7120FB20(a)microsoft.com...
> 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.


From: RonaldoOneNil on
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.

"Jose Lopes" wrote:

> 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.
 | 
Pages: 1
Prev: Control limitations
Next: Load Image Timing