Queries

M

Munchkin1111

i am currently trying to design a query at work.

i need to have critera in 3 boxes to search by, is this possible?

Please let me know if you can help.

Thanks
 
J

Jason Lepack

Probably.

More description is needed. Describe the relevant tables as well as
possibly an example input and expected output.

Cheers,
Jason Lepack
 
M

Munchkin1111

Hello,

i have one main table that is for clients choice of housing developments.

i have 3 development fields with drop down boxes, so that they can choose
their 3 main sites of interest.

i need to run a query to pull out all the clients that chose Linkwood Phase 5.

when i do the query with the criteria "linkwood Phase 5" in the first
development box it works, but when i try to pull the clients from development
box 2 and 3 it just comes up blank.

Thanks
 
J

Jason Lepack

Your database is not normalised and that could be an issue further
down the road.

Are you doing this in query designer? Criteria that are put on the
same line are compared using "AND", but if you put them on seperate
lines they are compared using OR.

So put the criteria on three different lines and you should be good.

Cheers,
Jason Lepack
 
M

Munchkin1111

Hello,

I dotn understand what you mean by Normalised?!#?!

in design view of the query, i have 3 fields Development Choice 1,
Development choice 2, and Development choice 3.

i need to put the criteria "Linkwood Phase 5" under all 3 fields. it pull
out the right records if i only put it in the first field, but whenever i
put it in the other 2 it doesnt work.

Nikki
:)
 
J

Jason Lepack

Open the query that works with the criteria in the one field in query
designer. Click View-> SQL View. Copy whatever's in there and paste
it here.

Cheers,
Jason
 
M

Munchkin1111

Thats it here,

SELECT Table1.Name, Table1.Address1, Table1.Address2, Table1.Address3,
Table1.Address4, Table1.[Post Code], Table1.[Date of Enquiry]
FROM Table1
WHERE (((Table1.Development)="South Street Flats"));
 
J

Jason Lepack

What are the other Development fields called? Change them below to
match your names.

SELECT
Table1.Name,
Table1.Address1,
Table1.Address2,
Table1.Address3,
Table1.Address4,
Table1.[Post Code],
Table1.[Date of Enquiry]
FROM
Table1
WHERE
Table1.Development="South Street Flats"
OR Table1.Development2="South Street Flats"
OR Table1.Development3="South Street Flats"


Thats it here,

SELECT Table1.Name, Table1.Address1, Table1.Address2, Table1.Address3,
Table1.Address4, Table1.[Post Code], Table1.[Date of Enquiry]
FROM Table1
WHERE (((Table1.Development)="South Street Flats"));



Jason Lepack said:
Open the query that works with the criteria in the one field in query
designer. Click View-> SQL View. Copy whatever's in there and paste
it here.

- Show quoted text -
 
Top