Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Searching a listbox and dumping results into another listbox

listbox searching

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1 KennethShank

KennethShank

    CC Lurker

  • New Member
  • Pip
  • 5 posts

Posted 24 July 2015 - 01:24 PM

Okay!  I wrote a program that is suppose to let a user know how many wins he got on a Pick 3 or Pick 4 lotto draw...

 

The problem is when I search List box 1 and dump the results into list box 2;  I don't get accurate results ... I get numbers that are not supposed to be there ...For example the list generated in list box one may have the following combinations :

 

04-02-05

04-01-05......... up to 10 different combinations. 

 

Okay! if I highlight the first combination and if it is among the numbers I am testing it will dump it into list box 2  even if only one of the number is present in the test number ... the problem is that if the first combination is there in any order it will dump it, but it also puts other 3 number combinations in list box 2.  It is only supposed to put the numbers that is in the test field list box 2.

 

The program is complete so I am not asking anybody to do my work for me; I just need some help.  If anyone is interested in helping I will attach the code to whoever responds to my post!!

 

Regards

 

Kenneth L. Shank

 

 



#2 lespauled

lespauled

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1360 posts

Posted 27 July 2015 - 08:06 AM

Without some of the search code, it's hard to determine the issue.

 

Odds are you're not including your delimiter in your search

 

For example, if your string looks something like this:

 

1-10-100-1000-10000

 

and you search for 1, you will get a result of 5 instances.


My Blog: http://forum.codecal...699-blog-77241/
"Women and Music: I'm always amazed by other people's choices." - David Lee Roth