Parameter features

P

pgaglioti88

I have to create a query that lets the user enter letters with the parameter
feature and display all the book titles that have the letters anywhere in
their name. I can get it to work, but only with the first letters in the
name, can anyone please help! MSN Chat if pgaglioti88
 
K

KARL DEWEY

You can have it to prompt you for query criteria like --

Like "*" & [Enter search letters] & "*"
 
P

pgaglioti88

Man, that worked perfect, I must of tried every combo except for that! I
really appreciate the help guy!

KARL DEWEY said:
You can have it to prompt you for query criteria like --

Like "*" & [Enter search letters] & "*"

RobFMS said:
You need to use the LIKE operator and the wildcard character * (asterick).
Take a look at the help file for more examples.

Here is a simple example:

Select *
From tblPerson
Where FirstName Like '*ob*'.

This example will find all people who's first name contains the letters
"OB".
As in:
Robert
Roberto
Roberta
Robin
Bob
Bobby
:
etc...

HTH

Rob Mastrostefano


--
FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com
 
Top