How to control what is displayed in a combo box

M

magicdds-

I have a combo box with four columns:

[NameID] [FirstName] [Last Name] [ FirstName] & " " &
[LastName]


Column #1 is the bound column and is hidden.
Columns 2,3,4 appear when you click on the drop down arrow.
After you make a selection in the drop down list, [FirstName] appears in the
box and the drop down list closes.

Instead, I would like the following to happen:
1)When you start to type in the combo box, entries from the list that match
your typing start to appear (Like what happens in the address bar of internet
explorer).
2)After making a selection based on the [LastName field] (right now it is
using the [Firstname]) the combo box displays column# 4 [FirstName] & " " &
[LastName] as the selection. (all the while, keeping column #1 [NameID] as
the bound column.

I would appreciate any feedback on how to make the combo box look more user
friendly.

Thanks
Mark
 
M

magicdds-

The names of the fields didn't post properly. Here is what is in each column
in the combo box:

[NameID]
[FirstName]
[Last Name]
[ FirstName] & " " & [LastName]
 
J

Jeanette Cunningham

Hi,
The combo has a property called Column Widths.
If you the second column ( the one for first name) users will be able to
type in the first letters of the last name and the combo will be user
friendly

Jeanette Cunningham
 
J

Jeanette Cunningham

Oops, that should read
If you *hide* the second column

Jeanette Cunningham

Jeanette Cunningham said:
Hi,
The combo has a property called Column Widths.
If you the second column ( the one for first name) users will be able to
type in the first letters of the last name and the combo will be user
friendly

Jeanette Cunningham


magicdds- said:
I have a combo box with four columns:

[NameID] [FirstName] [Last Name] [ FirstName] & " "
&
[LastName]


Column #1 is the bound column and is hidden.
Columns 2,3,4 appear when you click on the drop down arrow.
After you make a selection in the drop down list, [FirstName] appears in
the
box and the drop down list closes.

Instead, I would like the following to happen:
1)When you start to type in the combo box, entries from the list that
match
your typing start to appear (Like what happens in the address bar of
internet
explorer).
2)After making a selection based on the [LastName field] (right now it is
using the [Firstname]) the combo box displays column# 4 [FirstName] & " "
&
[LastName] as the selection. (all the while, keeping column #1 [NameID]
as
the bound column.

I would appreciate any feedback on how to make the combo box look more
user
friendly.

Thanks
Mark
 
J

John W. Vinson

I have a combo box with four columns:

[NameID] [FirstName] [Last Name] [ FirstName] & " " &
[LastName]


Column #1 is the bound column and is hidden.
Columns 2,3,4 appear when you click on the drop down arrow.
After you make a selection in the drop down list, [FirstName] appears in the
box and the drop down list closes.

Instead, I would like the following to happen:
1)When you start to type in the combo box, entries from the list that match
your typing start to appear (Like what happens in the address bar of internet
explorer).
2)After making a selection based on the [LastName field] (right now it is
using the [Firstname]) the combo box displays column# 4 [FirstName] & " " &
[LastName] as the selection. (all the while, keeping column #1 [NameID] as
the bound column.

I don't think you can have both these with a simple combo box. What you see
when the combo is not dropped down is the first non-zero width column (which
of course need not be the bound column); but that is ALSO the column that is
used for autocomplete. You want to use one field (lastname) for autocomplete
but to display a different field (the first/last name concatenation).

Might it be a suitable compromise to use a two column combo (ColumnWidths
0";1" say) based on

SELECT [NameID], [LastName] & ", " & [FirstName] AS Fullname ORDER BY
LastName, FirstName;

as the rowsource of the combo? This gets you both the autocomplete by typing
the lastname (and, if need be, part of the first name), AND display the full
name? The only inconsistancy with your request is that you want the users to
type the last name, but *see* the firstname preceding it. In my mind that
would be confusing for the user, whereas having them type the last name and
seeing the lastname (preceding the firstname) would be more consistant.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top