View Full Version : an input search field question


k9ine
02-05-2002, 10:14 AM
I want to make a database; and i'd like a form; with on it an input field, with a button, and when I fill in the input field and click the button; it shows the query results....it's for my cd collection.

exsample: I've got a "discribtion" field:

first record value: Windows 98 SE
second rec val : Windows 98

I'd like to give in: 98 to get all the records with 98 in the discription collum.. without the: Like "*98*" is the possible?
I don't want to use the search option build in acces, because I don't like it..

Alexandre
02-05-2002, 11:44 AM
I am wondering why you would not want to use Like"*xx*". It seems to be the right approach to your pb:
You would create and save a query using a parameter the folliwing way:

SELECT ..
FROM ...
LIKE "*" & [Enter a Keyword to search for in the description field: ] & "*"

Then in the on.click event of the command button the user will use to launch the query, you would write the approriate Docmd.OpenQuery statement.

Alex


[This message has been edited by Alexandre (edited 02-05-2002).]

k9ine
02-08-2002, 08:57 AM
thank you, you've solved my problem;

I didn't know how to do that.....

(Y)

k9ine
02-08-2002, 09:26 AM
can I use this trick on a form?,

like:

Like "*" & [Forms]![search]![seach]& "*"

that, the value from a textbox, updates the sql/query criteria?

Alexandre
02-08-2002, 11:30 AM
Yes.
Anyway, best thing to do in such case is just to give it a try don t you think? http://www.access-programmers.co.uk/ubb/smile.gif

Alex

k9ine
02-08-2002, 12:05 PM
you're right; thanx anyhow!!