PDA

Click to See Complete Forum and Search --> : DataSearch


AcornRanch
Jan 28th, 2000, 10:30 AM
I currently have a program that can write and read from a database using a series of text boxes. When an item number is entered and tap press it will check to see if that number is in the database and fill the remaining fields. If the number is not in the database the next textbox is description. I would like to program to search each time a letter is typed in the description and find the closest match. Like in programs such as quicken.

Example:

user types "a"
description shows "Access Software"
user adds a "x"
description shows "Axies Mapmaker"

any ideas on how to code this?

Forest Dragon
Jan 28th, 2000, 03:03 PM
Use the Change event of the Textbox and search the database using a query of this template:

SELECT * FROM DB WHERE Description Like TextBox1.Text & "*".

If you are using ADO, replace the last "*" with a "%"

Good Luck!!!

AcornRanch
Jan 29th, 2000, 02:25 AM
I tried using a bit of code but it gave me an error at the first *. Do you have any suggestions to help with that? It says it's looking for a case statment there.