Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / March 2008

Tip: Looking for answers? Try searching our database.

How to control what is displayed in a combo box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
magicdds- - 23 Mar 2008 22:12 GMT
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
magicdds- - 23 Mar 2008 22:28 GMT
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]

> I have a combo box with four columns:
>
[quoted text clipped - 20 lines]
> Thanks
> Mark
Jeanette Cunningham - 23 Mar 2008 22:49 GMT
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

>I have a combo box with four columns:
>
[quoted text clipped - 25 lines]
> Thanks
> Mark
Jeanette Cunningham - 23 Mar 2008 22:56 GMT
Oops, that should read
If you *hide* the second column

Jeanette Cunningham

> Hi,
> The combo has a property called Column Widths.
[quoted text clipped - 35 lines]
>> Thanks
>> Mark
John W. Vinson - 24 Mar 2008 01:40 GMT
>I have a combo box with four columns:
>
[quoted text clipped - 14 lines]
>[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.
Signature


            John W. Vinson [MVP]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.