473,399 Members | 2,159 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Controlling the Listbox display?

I am working on a lookup form, where the user will enter LastName
FirstName and check for duplicates. I have a list box that is bound to
a table of 200 members. After the user enters the name, I would like
the Listbox to automatically display the user found at the top row and
of course have the remaining members displayed alphabeticallly below
it. Actually, regardless of duplicates, I would like the ListBox to
display the closest name found alphabetically at the top.

Greg

Jan 16 '07 #1
2 2383

LastName and FirstName are unbound textboxes.

Jan 16 '07 #2

<Ap******@gmail.comwrote in message
news:11**********************@v45g2000cwv.googlegr oups.com...
>I am working on a lookup form, where the user will enter LastName
FirstName and check for duplicates. I have a list box that is bound to
a table of 200 members. After the user enters the name, I would like
the Listbox to automatically display the user found at the top row and
of course have the remaining members displayed alphabeticallly below
it. Actually, regardless of duplicates, I would like the ListBox to
display the closest name found alphabetically at the top.
List Boxes purpose for existence is to allow the user to select a value, not
for displaying values, and they don't work in the way you describe. They
display the values in the order they are retrieved by the Row Source. You
could jump through some hoops, add an extra field to the table, set it after
selection, and... well, it's probably not worth the effort.

Why don't you use a Combo Box? With the AutoExpand property set (and it is
set as the default), will scroll to the first matching entry... it'll be a
lot better, in most cases, than requiring the user to type in the name and
then using a control intended for selection to display it. If you want it to
work more-or-less like a List Box, you set the Limit to List property of the
Combo Box to Yes.

Larry Linson
Microsoft Access MVP
Jan 18 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Fieldmedic | last post by:
I'm attempting to get an arraylist to display in a Listbox (listbox2). The arraylist is created from selections in a different listbox (listbox1). The 1st listbox has a selection mode of...
1
by: Annette Massie | last post by:
I would like to have a form that lists current addresses being used. On this form I would also like to have a command button that would allow the user to add an address if they do not see it...
3
by: gdbjohnson-AT-yahoo-dot-ca-nospamplz | last post by:
I have a ListBox built of a simple custom object for the ListItems used to be able to hold a Data Value, and a Display Value, with accessors for each. I have overridden the ToString method to...
4
by: questions | last post by:
I create a Form and call another class (e.g. class1.cs). (class1.cs) contains a command to call back the Form to display a string variable in a listbox. However, it doesn't works. The listbox gets...
2
by: Peteroid | last post by:
I'm going to be using a ListBox in my managed C++ application, and have a question. Why are the Items you Add to a ListBox in the form of generic Object*'s? I believe a ListBox displays a table of...
2
by: tangokilo | last post by:
Hello and thanks for your help, I have the following Listbox created in VisualStudio 2003 designer, desiring to select multiple entries from that list: -------------------------------...
0
by: LostInMd | last post by:
Hi All, I've got an owner drawn listBox where I draw and measure the items that I add to the listBox. For example, I have a listBox that can only display 10 characters on each horizontal line. ...
2
by: remya1000 | last post by:
i'm using VB.NET. i have a table names "EMP". this table contain employee details like Index, empID, First name, Last name, address, phone number etc. while page loads, i need to display Last...
5
by: Academia | last post by:
(If you've seen this in the drawing NG, sorry. I inadvertently sent it there.) I have a listbox populated with Objects. The Class has a String field that ToString returns. I assume that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.