Solved

Displaying the correct item in a combo box when loading a form.

Posted on 2004-09-02
2
234 Views
Last Modified: 2010-05-02
Hi all.

I am loading a form with a combo box on it.  
In the combo box, item 0 = M, 1 = A, 2 = A, 3 = B, 4 = O.
When I load the form I collect a number from a database which tells me what the combo box is set as.
The question is how do I get the combo box to have item 3 already selected?
At the moment instead of displaying B in the combo it displays the number 3.

Any help much appreciated.

Cheers,
Shivermetimbers.
0
Comment
Question by:shivermetimbers
[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
2 Comments
 
LVL 7

Accepted Solution

by:
_agj_ earned 50 total points
ID: 11962001
u can set the ListIndex property of the combo to 3.
0
 

Author Comment

by:shivermetimbers
ID: 11962024
Ha! Excellent - I knew it would be an easy one, just couldnt quite get there myself!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month10 days, 19 hours left to enroll

628 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