Click to See Complete Forum and Search --> : VB.Net listbox population


jsswope
March 3rd, 2003, 12:03 AM
When reading the text file, i populate the
list boxes in my form for each field. since some records in the file have duplicate field items, they show up more than once in my list box as a user selection. My list boxes are for users to select say candy flavor then write the
selections back to the same file that it opened for reading?

Code below in file attachment

jsswope
March 3rd, 2003, 03:44 PM
how can I check (strFields(1)) etc when populating a listbox with the text file? I need to eliminate duplicate record fields?

clayk0he
March 7th, 2005, 08:17 AM
Try loading the data to an array then placing the data from the array into the listbox. That way you can look through the array for any dupes and move on to the next item

Keith

DSJ
March 7th, 2005, 08:23 AM
You can use ListBox.FindString and ListBox.FindStringExact to see if the item is already there.