As a simpler, and presumably more efficient, alternative to using a series
of DLookups, the combo box can be bound not just to the name field of a table
or query, but to the other required fields as well. Having selected the
surname, the associated values can then be read directly as Name.Column(1),
Name.Column(2), etc., where the surname itself is in the default column,
Name.Column(0), or simply Name.
This works quite well if the columns are made wider than the width of the
combo box, thus effectively hiding the additional fields. One snag, however,
is that a horizontal scroll bar is automatically added to the bottom of the
drop-down list which, in such applications, is generally superfluous and can
be distracting. Unlike in form design, there does not appear to be an
obvious mechanism for hiding this feature. Can it be done?
Instead of making the columns wider than the list, just set the widths
of those you want to hide to 0.
Clifford Bass
In the Column Widths property enter the width of each column, separated
by a semicolon. So if you have three columns and only want the first column
to show and be 2.5" wide you would enter:
2.5;0;0
If you system uses inches it will adjust to show as:
2.5";0";0"
Glad to help; and you are welcome.