Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Move Item To Top Of ComboBox

Posted on 2002-05-02
10
Medium Priority
?
234 Views
Last Modified: 2008-02-26
I am working with a combobox that is sorted.  I want to add an item after the sorted items are entered that will be at the top of the combobox... like NONE.

I don't want to use a space or an underscore to move it to the top... anyway to do this???

Thanks!
0
Comment
Question by:MTroutwine
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6986163
No.  The only other way would be for you to maintain the sorted items and leave the Sort property = False.

Anthony
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 6986195
Indeed, sort the items first and then add them to the combo box is the only way of doing this.
0
 
LVL 18

Expert Comment

by:deighton
ID: 6986226
'with.sorted is true
   
    Combo1.AddItem "Bunk"
    Combo1.AddItem "Abunk"
    Combo1.AddItem "NONE", 0
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 18

Expert Comment

by:deighton
ID: 6986230
note that your combo has .sorted=true in properties.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6986239
deighton,

You are right.  I overlooked that solution.

Anthony
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6986392
i am late!
0
 
LVL 18

Expert Comment

by:deighton
ID: 6986412
..so did I, it was an accident, I was trying to change sorted to .false then add it to the top - you can't change to .false, but adding it to the top still seems to work.
0
 
LVL 22

Accepted Solution

by:
rspahitz earned 600 total points
ID: 6986507
Alternately you can do what Microsoft did ni its properties listing (with name, custom, etc.) and surround it with parentheses:  "(None)"

This will also reinforce the idea that this is not part of the dataset.
0
 
LVL 3

Author Comment

by:MTroutwine
ID: 7016464
Sorry for the delay on this... I used your idea of "(None)".  Works fine now.
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7016714
Glad you liked the idea (even if it came from Microsoft), and thanks for the "A" grade.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question