From: Iram on
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
From: John W. Vinson on
On Fri, 30 Apr 2010 12:33:01 -0700, Iram <Iram(a)discussions.microsoft.com>
wrote:

>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).
--

John W. Vinson [MVP]
From: Iram on
Awesome, it worked!



Thanks.
Iram

"John W. Vinson" wrote:

> On Fri, 30 Apr 2010 12:33:01 -0700, Iram <Iram(a)discussions.microsoft.com>
> wrote:
>
> >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).
> --
>
> John W. Vinson [MVP]
> .
>