Combo Box Issue
am 09.11.2007 04:34:46 von tbrogdon
Why does my combo box list the ID value rather than the Name?
I have tblWorkstation w/
WorkstationID (PK - autonumber)
WorkstationName
I have tblProductOperation w/
WorkstationID (FK to Workstation.WorkstationID)
I have a form created on tblProductOperation that has a combo box with
the following settings:
Control Source: WorkstationID (the FK in ProductOperation)
Row Source Type: Table/Query
Row Source: SELECT DISTINCT tblWorkstation.WorkstationID,
tblWorkstation.WorkstationName FROM tblWorkstation ORDER BY
WorkstationName;
When I open the form and select the combo box I get a list of the IDs
not the names.
I want the form user to see and choose the workstation name from the
combo box because the ID means nothing to them and I want that choice
to be stored in tblProductOperation in the WorkstationID field as the
ID number not the name. I just want to see the name in the combo box.
I know this is kindergarten stuff. I am just learning and any help is
greatly appreciated.
Thanks a bunch,
Tim
Re: Combo Box Issue
am 09.11.2007 04:41:55 von Allen Browne
Set these properties for your combo:
Column Count: 2
Column Widths: 0
It now knows that there are 2 columns in the RowSource, and since the first
column is zero-width, it displays the second.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
wrote in message
news:1194579286.913096.14180@k35g2000prh.googlegroups.com...
> Why does my combo box list the ID value rather than the Name?
>
> I have tblWorkstation w/
> WorkstationID (PK - autonumber)
> WorkstationName
>
> I have tblProductOperation w/
> WorkstationID (FK to Workstation.WorkstationID)
>
> I have a form created on tblProductOperation that has a combo box with
> the following settings:
> Control Source: WorkstationID (the FK in ProductOperation)
> Row Source Type: Table/Query
> Row Source: SELECT DISTINCT tblWorkstation.WorkstationID,
> tblWorkstation.WorkstationName FROM tblWorkstation ORDER BY
> WorkstationName;
>
> When I open the form and select the combo box I get a list of the IDs
> not the names.
>
> I want the form user to see and choose the workstation name from the
> combo box because the ID means nothing to them and I want that choice
> to be stored in tblProductOperation in the WorkstationID field as the
> ID number not the name. I just want to see the name in the combo box.
> I know this is kindergarten stuff. I am just learning and any help is
> greatly appreciated.
>
> Thanks a bunch,
>
> Tim
Re: Combo Box Issue
am 09.11.2007 05:01:47 von tbrogdon
On Nov 8, 9:41 pm, "Allen Browne" wrote:
> Set these properties for your combo:
> Column Count: 2
> Column Widths: 0
>
> It now knows that there are 2 columns in the RowSource, and since the first
> column is zero-width, it displays the second.
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia
> Tips for Access users -http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> wrote in message
>
> news:1194579286.913096.14180@k35g2000prh.googlegroups.com...
>
>
>
> > Why does my combo box list the ID value rather than the Name?
>
> > I have tblWorkstation w/
> > WorkstationID (PK - autonumber)
> > WorkstationName
>
> > I have tblProductOperation w/
> > WorkstationID (FK to Workstation.WorkstationID)
>
> > I have a form created on tblProductOperation that has a combo box with
> > the following settings:
> > Control Source: WorkstationID (the FK in ProductOperation)
> > Row Source Type: Table/Query
> > Row Source: SELECT DISTINCT tblWorkstation.WorkstationID,
> > tblWorkstation.WorkstationName FROM tblWorkstation ORDER BY
> > WorkstationName;
>
> > When I open the form and select the combo box I get a list of the IDs
> > not the names.
>
> > I want the form user to see and choose the workstation name from the
> > combo box because the ID means nothing to them and I want that choice
> > to be stored in tblProductOperation in the WorkstationID field as the
> > ID number not the name. I just want to see the name in the combo box.
> > I know this is kindergarten stuff. I am just learning and any help is
> > greatly appreciated.
>
> > Thanks a bunch,
>
> > Tim- Hide quoted text -
>
> - Show quoted text -
Thanks Allen. That did it.
Tim