Show only people who match multiple paramaters

S

Supe

I have a query the runs off a form that that has 5 different fields. How do
I set it up so the query only pulls data that matches all the paramaters?

For example, I want to find people have a salary above $40,000 AND a rating
above 4. If I run now it shows eveyone that has a salary about $40,000 OR a
rating above 4.
 
K

KARL DEWEY

Post you query. Open the query in design view, click on menu VIEW - SQL View,
hightlight all, copy, and paste in a post.
 
S

Supe

SELECT [Pitchers-Proj].PITCHERS, [Pitchers-Proj].[First Name],
[Pitchers-Proj].[Last Name], [Pitchers-Proj].[$], [Pitchers-Proj].Team,
[Pitchers-Proj].W, [Pitchers-Proj].K, [Pitchers-Proj].ERA,
[Pitchers-Proj].WHIP, [Pitchers-Proj].SV
FROM [Pitchers-Proj]
WHERE ((([Pitchers-Proj].[$])<=[Forms]![Pitcher Spec Data]![cost]) AND
(([Pitchers-Proj].W)<=[Forms]![Pitcher Spec Data]![Wins]) AND
(([Pitchers-Proj].ERA)<=[Forms]![Pitcher Spec Data]![ERA]) AND
(([Pitchers-Proj].WHIP)<=[Forms]![Pitcher Spec Data]![WHIP]))
ORDER BY [Pitchers-Proj].[$] DESC;
 
K

KARL DEWEY

Try this --
SELECT [Pitchers-Proj].PITCHERS, [Pitchers-Proj].[First Name],
[Pitchers-Proj].[Last Name], [Pitchers-Proj].[$], [Pitchers-Proj].Team,
[Pitchers-Proj].W, [Pitchers-Proj].K, [Pitchers-Proj].ERA,
[Pitchers-Proj].WHIP, [Pitchers-Proj].SV
FROM [Pitchers-Proj]
WHERE ((([Pitchers-Proj].[$])>=[Forms]![Pitcher Spec Data]![cost]) AND
(([Pitchers-Proj].W)<=[Forms]![Pitcher Spec Data]![Wins]) AND
(([Pitchers-Proj].ERA)>=[Forms]![Pitcher Spec Data]![ERA]) AND
(([Pitchers-Proj].WHIP)<=[Forms]![Pitcher Spec Data]![WHIP]))
ORDER BY [Pitchers-Proj].[$] DESC;

--
KARL DEWEY
Build a little - Test a little


Supe said:
SELECT [Pitchers-Proj].PITCHERS, [Pitchers-Proj].[First Name],
[Pitchers-Proj].[Last Name], [Pitchers-Proj].[$], [Pitchers-Proj].Team,
[Pitchers-Proj].W, [Pitchers-Proj].K, [Pitchers-Proj].ERA,
[Pitchers-Proj].WHIP, [Pitchers-Proj].SV
FROM [Pitchers-Proj]
WHERE ((([Pitchers-Proj].[$])<=[Forms]![Pitcher Spec Data]![cost]) AND
(([Pitchers-Proj].W)<=[Forms]![Pitcher Spec Data]![Wins]) AND
(([Pitchers-Proj].ERA)<=[Forms]![Pitcher Spec Data]![ERA]) AND
(([Pitchers-Proj].WHIP)<=[Forms]![Pitcher Spec Data]![WHIP]))
ORDER BY [Pitchers-Proj].[$] DESC;


KARL DEWEY said:
Post you query. Open the query in design view, click on menu VIEW - SQL View,
hightlight all, copy, and paste in a post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top