Referencing another field

  • Thread starter Thread starter Iram
  • Start date Start date
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
 
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).
 
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).
 
Back
Top