How do I enter data I want to search for?

Davighi

Registered User.
Local time
Today, 00:48
Joined
Sep 27, 2004
Messages
17
Entering data

I have created the following sql query to search for records that contain 'thistext' anywhere in the record and to display that record.

SELECT adverts.title
FROM adverts
WHERE (((adverts.title) Like "*thistext*"));

The query works fine, however, I have to perform this a number of times using different words. How can I make it so that when you run the query it asks you to input the text you want to search for?

I am a near beginner and am using Access 2002
 
Last edited:
The simplest way:

SELECT adverts.title
FROM adverts
WHERE adverts.title Like "*" & [Enter Search Text] & "*";
 
Edit

pbaldy beat me to it :(
 
Last edited:

Users who are viewing this thread

Back
Top Bottom