borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Display In DataGrid)Next Topic (add new record in vb6 with ADO) New Topic New Poll Post Reply
AndreaVB Forum : Database : How to make the Data Combo search automatically
Poster Message
Daniel
Level: Guest


icon How to make the Data Combo search automatically

Hi,

After loading the data combo control with a list of values from a database, I'd like the data combo to performs for me a "best mach search" according to the characters I type into the text box of it and automatically to fill the text box of it , if a value found, with the value that is found.

Any help would be appreciated
Cheers
Daniel

20-12-2002 at 08:52 AM
| Quote Reply
vbgen
Level: Moderator

Registered: 10-10-2002
Posts: 876
icon Re: How to make the Data Combo search automatically

my guess is that you load the content of the text box into a string, then code it up to read the string letter by letter with the contents of the list of values.

i don't have the code here, but the idea would be to check value per value with comparison to the string in the text, then move to the next if the next letter of each string become unequal.

if you do find a perfect match early in the sequence, you'd still have to write code to save that value in a variable, then proceed with the other values, until you have checked all of them, just so that you have accuracy, in the sense that you maight have two ro three perfect matches, because you did check the whole list.

don't stop when you find a perfect match...
loop through all the contents of the list..

was that clear?

____________________________
Been busy trying to take a second degree <--it's not working out...

20-12-2002 at 09:04 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Database : How to make the Data Combo search automatically
Previous Topic (Display In DataGrid)Next Topic (add new record in vb6 with ADO) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder