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

x
?
Solved

Clearing a combo box

Posted on 2002-04-19
4
Medium Priority
?
1,484 Views
Last Modified: 2012-08-13
I want to reset the selected item in a combo box. I am letting the user select an item then this item is written to a DB and the combo reset. I am using VB6 and the style of the combo is 2 - drop down list

Thanks

merlin007
0
Comment
Question by:merlin007
[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
4 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 6953949
Use

Combo1.RemoveItem Combo1.ListIndex

0
 
LVL 2

Accepted Solution

by:
UncleMatt earned 200 total points
ID: 6953950
try cbowhatever.listindex = -1

Matt.
0
 

Author Comment

by:merlin007
ID: 6953998
Thanks Uncle Matt
TimCoffee - the RemoveItem take the selection from the list completely. I probably did not explain the question properly, Thanks

Regards

Merlin007
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 6954028
You probably did merlin, I just misinterpreted it. Anyway you got a good answer from UncleMatt.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

610 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