473,805 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can you alphabetize combo box contents?

Hi!

Currently my combo box contents are not in alphabetical order, and I'm
wondering if there is a way to make the contents appear in
alphabetical order when you open the combo box. How would you do this?
Many thanks!

Kevin
Nov 12 '05 #1
2 9148
On Thu, 15 Jan 2004 03:56:06 GMT, Bayou BoB <ca*******@hotm ail.com>
wrote:
Hi!

Currently my combo box contents are not in alphabetical order, and I'm
wondering if there is a way to make the contents appear in
alphabetical order when you open the combo box. How would you do this?
Many thanks!

Kevin


Kevin,
Make a query or an SQL statement the Rowsource of the Combo Box.
If you use a query, sort the query by the field wanted.

If you make an SQL the rowsource, add
Order By [Somefield];
at the end.
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.
Nov 12 '05 #2
Bayou BoB <ca*******@hotm ail.com> wrote in message news:<9k******* *************** **********@4ax. com>...
Hi!

Currently my combo box contents are not in alphabetical order, and I'm
wondering if there is a way to make the contents appear in
alphabetical order when you open the combo box. How would you do this?
Many thanks!

Kevin


Base the combobox on a query and sort ascending on the text field.

David
Nov 12 '05 #3

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

Similar topics

13
2900
by: mr_burns | last post by:
hi, is it possible to change the contents of a combo box when the contents of another are changed. for example, if i had a combo box called garments containing shirts, trousers and hats, when the user selects shirts another combo box called 'size' would contain sizes in relation to shirts (ie. chest/neck size). the same would occur for trousers and hats. when the user selects an option in the garment combo box, the options available...
2
3064
by: Jeff Barry | last post by:
Hi, I wonder if any one can help, I'm pretty new to Access and I can't figure out how to change the contents of a combo box based on a selection I make in another. Let me explain I have a combo box where I can select a continent from a continent table. I would like the contents of a second combo box to reflect my choice of continent and list countries that are in that continent. These countries are in separate tables/queries (actually...
0
1213
by: Lauren Wilson | last post by:
Hi Folks, I have a combo box on a multi-record form. About every other time I select something from the STATIC list of options, I get this result: What on earth is the cause of this error message? --------------------------- Microsoft Visual C++ Runtime Library ---------------------------
2
6998
by: TS | last post by:
Hi all, From my windows form, I opened a connection to a SQL database. Now I need to generate a combo box from a SELECT statement pointing to the last name column in the SQL tables. I am stuck with the code I should use to generate this combo box. I used to use ADO to open a connection to SQL in VB6 then use Do until EOF - Loop to loop through the recodset and the cbo.additems to place the result of the recordset in the combo box. With...
2
1993
by: John Crouse | last post by:
I have a text file like so: ben amy jerry ann john and would like to alphabetize each line like so:
3
1447
markmcgookin
by: markmcgookin | last post by:
Hi Folks, I was wondering if anyone knew how to alphebetize the values in a combo box? It is being populated by an SQL Query, however as the values that I am searching through are of type 'ntext' I can not do an ORDER BY in the statement (You can't do that on these values) I was wondering if anyone had any code to sort a combo box into alphebetical order? The combo box is called cboResults and has a bunch of text values in it.
13
8643
by: mirandacascade | last post by:
I want to set things up such that a section of code will have been executed by the time one clicks on the drop down arrow on a combo box control. Currently, that section of code resides in the OnGetFocus event of the combo box control, and this appears to work...I'm guessing because one cannot click on the drop down arrow of a combo box control without first having the combo box control receive focus. But I noticed that the code gets...
1
2007
by: andi111 | last post by:
Good Morning All, I am having problems turning my Matter_Creation_Form.DOC into a Matter_Creation_Form.DOT. Now, Within Word, I have created a document that contains 2 Combo Boxes which, when a .DOC file, the contents of them appears fine. I then resave the file as a template (with the extension .DOT to change it into a template) and the contents of the Combo Boxes does not appear.
0
9718
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10369
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10109
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9186
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7649
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3847
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.