Referencing another field

I

Iram

Hello,

I have a Combobox field called "WorkerID" on a form. This field is not tied
to the Forms data source. It is pretty much floating, no control source, but
it does have a Row Source Type, Select Query that pulls Worker IDs form a
table called "tbl_WorkerIDs". This table has both WorkerIDs and WorkerNames.
I want to add another floating combobox field to the form to display the
WorkerNames. So if I change the combobox WorkerID I need the WorkerName to
change automatically.
How do I configure the WorkerName combobox to look at the WorkerID field and
update after the WorkerID has been changed?



Thanks.
Iram
 
J

John W. Vinson

Hello,

I have a Combobox field called "WorkerID" on a form. This field is not tied
to the Forms data source. It is pretty much floating, no control source, but
it does have a Row Source Type, Select Query that pulls Worker IDs form a
table called "tbl_WorkerIDs". This table has both WorkerIDs and WorkerNames.
I want to add another floating combobox field to the form to display the
WorkerNames. So if I change the combobox WorkerID I need the WorkerName to
change automatically.
How do I configure the WorkerName combobox to look at the WorkerID field and
update after the WorkerID has been changed?

I'd include both the worker ID and worker name in the first combo box; then
use a Textbox - not a combo box - on the form with a control source

=[WorkerID].Column(1)

to display the second column, the worker name (the Column property is zero
based).
 
I

Iram

Awesome, it worked!



Thanks.
Iram

John W. Vinson said:
Hello,

I have a Combobox field called "WorkerID" on a form. This field is not tied
to the Forms data source. It is pretty much floating, no control source, but
it does have a Row Source Type, Select Query that pulls Worker IDs form a
table called "tbl_WorkerIDs". This table has both WorkerIDs and WorkerNames.
I want to add another floating combobox field to the form to display the
WorkerNames. So if I change the combobox WorkerID I need the WorkerName to
change automatically.
How do I configure the WorkerName combobox to look at the WorkerID field and
update after the WorkerID has been changed?

I'd include both the worker ID and worker name in the first combo box; then
use a Textbox - not a combo box - on the form with a control source

=[WorkerID].Column(1)

to display the second column, the worker name (the Column property is zero
based).
 

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