473,466 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

To remove items from a Combo Box list permanently in VB6.0

8 New Member
Hello,

How can I remove selected items from a combo box permanently from the list during run time in VB 6.0. It should not show up in the next run time.

Please help.

Thank You,
Pratibha
Jul 26 '07 #1
6 5642
pureenhanoi
175 New Member
Hello,

How can I remove selected items from a combo box permanently from the list during run time in VB 6.0. It should not show up in the next run time.

Please help.

Thank You,
Pratibha
If all item from ur combobox are fix (u have been inserted from designer) so u cannot remove any items. If they are dinamic (loaded from database), simply remove from database also when u remove from combobox
Jul 26 '07 #2
Killer42
8,435 Recognized Expert Expert
If all item from ur combobox are fix (u have been inserted from designer) so u cannot remove any items. If they are dinamic (loaded from database), simply remove from database also when u remove from combobox
I have to disagree, pureenhanoi. The fact that items are placed in the list at design time has no bearing. They can still be removed with the .RemoveItem method.

mysore, The real issue here is persistence of your list from one execution to the next. As usual, to do this you need to record the information somewhere, so you can read it back next time. The three places that immediately come to mind would be a text file, a database or the system registry.
Jul 27 '07 #3
fplesco
82 New Member
I have to disagree, pureenhanoi. The fact that items are placed in the list at design time has no bearing. They can still be removed with the .RemoveItem method.

mysore, The real issue here is persistence of your list from one execution to the next. As usual, to do this you need to record the information somewhere, so you can read it back next time. The three places that immediately come to mind would be a text file, a database or the system registry.
Hi Killer42 -

You are right at that point, that you can remove list items from the Combo box object by .RemoveItem, but the problem is, it is merely on that run / instance. I mean, after you terminate the program... it will list back all items which were loaded in the design time, which means, including the one you previously removed.
Jul 27 '07 #4
mysore
8 New Member
You are right. Whether the items added to the list in design time or run time does not matter. It will go away with the RemoveItem method only for that particular run time /instance. I guess this has to be stored in the database and removed from the database or registry.

Thanks . This makes sense.

Pratibha
Jul 27 '07 #5
debasisdas
8,127 Recognized Expert Expert
for that u need to store the data in the database and retrive it back around the next time u execute the same .
Jul 27 '07 #6
pureenhanoi
175 New Member
I have to disagree, pureenhanoi. The fact that items are placed in the list at design time has no bearing. They can still be removed with the .RemoveItem method.

mysore, The real issue here is persistence of your list from one execution to the next. As usual, to do this you need to record the information somewhere, so you can read it back next time. The three places that immediately come to mind would be a text file, a database or the system registry.
i mean that, all fixed items always existing when control being loaded. It cannot be removed at runtime and continue disappear at next runtime (except you remove it again). As your mind, you inserted an item at design time and remove it at runtime, is this? Why did you must do that? Simpy dont insert it at runtime. Look at the concept. We're talking about one item is being removed at runtime and it shouldnt appear again at next runtime. My example is comparing between fixed item and dinamic item only. okey?
Jul 27 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Reggie | last post by:
Hi and TIA! I have a bound combobox with rowsource set to value list, limit to list=true and NotInList procedure to add(or not) a value the user types in. This works fine and it does add the...
9
by: Don | last post by:
Is there any way to detect when an item has been added to the Items collection of a combobox or listbox? I am inheriting a Combobox and want to validate items before they are added to the...
1
by: Gian Paolo | last post by:
hi all i'm looking for a way to add 2 items in a combobox in the same line and hide one. i'm working on the code above but it returns me only the last value i entered and i do not know why.... ...
2
by: Chesne | last post by:
I would like to be able to utilise a combo box where once an item has been selected then that item no longer appears in that list. Is there some code anyone has which will achieve this? If I...
0
by: sathyan8294 | last post by:
i am using vb.net 2003.i am doing my project in vb.net windows application. how do i remove selected row permanently from sql database through datagrid in vb.net windows form during runtime. for...
6
by: mysore | last post by:
I am using VB6.0 I have two combo boxes , namely combo1 and combo2. For E.g, I say Combo1.AddItem Combo1.Text to add a new item to the list during run time. In the drop down I do see the new item...
6
by: henry.onovwaka | last post by:
Can someone help on this problem. I have a combo box of, say three Items, selected from a table that serves as the lookup: E.g. 1 Earth, 2 Pine, 3 Earth Grave The combo box is on the subform. ...
2
by: mygirl22 | last post by:
Hi, I used this code to created 2 combo boxes General and Specific...and Only show Specific (Combo B) when Combo A is chosen..... What i need now is to know how to assign specific values to the...
13
by: premMS143 | last post by:
Hi Everybody, I'm using VB to create a stand alone application. I want to delete some data item from Combo box & List Box. I've done this. When I try to delete any data item from the combo or...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
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
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.