searching part of text

Tech

Registered User.
Local time
Today, 10:48
Joined
Oct 31, 2002
Messages
267
hi there,

i can't remember if I posted this, but if so, I DEEPLY apologise.

I have a query which searches a label of a track via a form with a text box.

what I need to know is, if we enter text in this box, how can i make the query search PART or ALL (really PART) of the inputted text. so if we have a track called Cafe Dal Mar but we can't remember it, the user simply enters Cafe and maybe 4-10 results of that title appears...eventually we go thru the listed tracks and find that track.

how do I do this?

Thank-you in advanced :)
 
Use a combo box instead of a text box. Base it on the query and make it a Totals query. This will then show only the names that exist in the query, without duplicates, and you do not need to look for partial names. Also, when the user starts to type in the name the combo will start moving towards the name you are looking for. If you type in Z then the combo will immediately show the names that start with Z and will continue to narrow down the list as you enter additional letters....

If you want to stick to a text box then use code like this in the Criteria line of your query:

Like "*" & [Forms]![FormName]![TextBoxName] & "*"

hth,
Jack
 
yeh, i know what u mean...like what i had to do for my uni project :p

but is there no other way? sure, i may do this, but prefer doing the initial idea - if there isn't, no bother, i will use ur advice :D
 
If you want to stick to filling in a text box on a form then my second suggestion will find Cafe Del Mar if you enter Del or if you enter Cafe you will get back as many records as there are that have Cafe in the name....

I hope I understood your response...

Jack
 
no..that doesn't work :p

it has to be an accurate piece of text in order to search the whole database :(
 
I don't understand your response. All I can say is that if the input is not accurate then the output won't be either.

Jack
 

Users who are viewing this thread

Back
Top Bottom