473,406 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

combobox multiple entry

Hi...

how to avoid multiple entry display in combo box?

ie) if we are displaying the TV List in Combo...

combo1.additem "samsung"
combo1.additem "onida"
combo1.additem "samsung"

how to disaply onida and samsung one time...?

Sree..
May 2 '08 #1
3 1522
debasisdas
8,127 Expert 4TB
You need to check if the item already exists before adding that to the list.
May 2 '08 #2
lotus18
866 512MB
Hi...

how to avoid multiple entry display in combo box?

ie) if we are displaying the TV List in Combo...

combo1.additem "samsung"
combo1.additem "onida"
combo1.additem "samsung"

how to disaply onida and samsung one time...?

Sree..
Doing loops will fix this.

Rey Sean
May 2 '08 #3
kuzen
20
Expand|Select|Wrap|Line Numbers
  1. dim Exists as boolean=false
  2. for i as integer=0 to your_combo.items.count-1 do
  3. if your_combo.items.item(i)=new_equipment_name then
  4. Exists=true;
  5. exit for;
  6. end if
  7. next
  8.  
  9. if not Exists then
  10. your_combo.items.add(new_equipment_name)
  11. else
  12. msgbox("Already in the list")
  13. end if
  14.  
May 5 '08 #4

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

Similar topics

3
by: Harlin Seritt | last post by:
I've created a ghetto-ized ComboBox that should work nicely for Tkinter (unfortunately no dropdown capabilities yet). I've found why it's such a pain in the @ss to create one. You have to...
0
by: Susan Bricker | last post by:
The following error: "The current field must match the join key '?' in the table that seves as t the 'one' side of one-to-many relationship. Enter a record in the 'one' side table with the...
2
by: Susan Bricker | last post by:
I went back to read my post and found an error in my description ... here is the post, again, corrected: The following error: "The current field must match the join key '?' in the table that...
2
by: SKarnis | last post by:
We are trying to rebuild a current Access 2002 (XP) mdb program to VB.NET with a SQL database - we are having problems with a suitable combobox. There are many threads discussing multiple column...
1
by: zsessions | last post by:
The way I understand it is there are three types of DropDownStyles for a ComboBox control in VB.net 2003, Simple, DropDown and DropDownList. I like the way DropDownList will zero in on your choice...
5
by: Steve B. | last post by:
Without adding whitespace to the ComboBox datasource is there a way I can add a blank entry or, a reset entry, to the ComboBox dropdown Thanks Steve
1
by: tizmagik | last post by:
I have a combobox on a continuous form that has a recordsource that is set upon Form_Load event via VBA (based on initial form data and external form data entered). For data entry purposes the...
3
by: Simon Tamman | last post by:
I've come across an interesting bug. I have workarounds but i'd like to know the root of the problem. I've stripped it down into a short file and hope someone might have an idea about what's going...
3
by: summiyashaheen | last post by:
how can i see multiple items in a combobox without clicking on it??? i want to use combobox getting dynamic list from the database on text box text change event. i want to view the complete list...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...
0
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...

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.