Hi Rob,
I want the user to select via name, using the ID column as hidden.
Though Its Important I store the ID column somewhere as It needs to be
passed into a query that builds a subform.
The Row Source for your combo box should look something like this:
SELECT ID, [Name] FROM MyTable ORDER BY [Name]
The combo box should have the following properties:
On Format tab
Column Count: 2
Column Widths: 0";1.5"
List Rows: 20
On Data tab
Row Source Type: Table/Query
Row Source: See above (or use a saved query)
Control Source: Specify the appropriate foreign key field to
receive the EmployeeID
Bound Column: 1
I encourage you to avoid the use of any reserved words for things that you
assign a name to in Access. It turns out that "Name" is a reserved word.
Access MVP Allen Browne has an extensive listing of reserved words, here:
http://allenbrowne.com/AppIssueBadWord.html
He also offers an application, written in Access, which you can download
to
check your existing databases for the use of reserved words (and a host of
other issues as well). See the link for the "Database Issue Checker
Utility"
on the above page.
Also, I would use a more descriptive field name in place of just "ID".
Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
Rob W said:
Greetings,
I have a combo box on a form based on a table with the following fields:-
ID
Name
I want the user to select via name, using the ID column as hidden.
Though Its Important I store the ID column somewhere as It needs to be
passed into a query that builds a subform.
Ive been looking at bound to try to the bound it to the ID but display
the
Name only in the combo box, without any luck.
Does anyone have any suggestions please?
Thanks
Rob