Query Info

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

When you have a Query with multiple fields and they all have to be
greater than zero how do you do this. The Query works fine when I
choose one field greater than zero but the minute I choose a second
field to be greater than zero the Query comes up blank. I guess the
Query is looking for both criteria. I have four fields. How do I make
the Query show only those greater than Zero. , two fields are Currency,
and two fields are Percentage.
Thanks
DS
 
Hi,
It's not clear from your post what results you want.
If you truly want only the records where all 4 fields are greater than
zero, then you simply place that criteria in the 4 fields in the query grid.
This is known as ANDing criteria.
Of course the query is looking for records where ALL 4 fields satisfy the criteria.

"How do I make the Query show only those greater than Zero"

Only those what? records?
It sounds like you really do want to AND your criteria, if you don't
you can OR them as well.
Just place the criteria for the four field on *seperate lines* in the grid which
will result in ORing them.
 
Hi,
I forgot to add, to be absolutely clear on what you want,
it's customary to provide sample data from your table(s) and the
output you expect from your query.
 
Dan said:
Hi,
It's not clear from your post what results you want.
If you truly want only the records where all 4 fields are greater than
zero, then you simply place that criteria in the 4 fields in the query grid.
This is known as ANDing criteria.
Of course the query is looking for records where ALL 4 fields satisfy the criteria.

"How do I make the Query show only those greater than Zero"

Only those what? records?
It sounds like you really do want to AND your criteria, if you don't
you can OR them as well.
Just place the criteria for the four field on *seperate lines* in the grid which
will result in ORing them.
Thanks, your advice worked, placing the criteria on four different rows
worked, but now I need a 5th row and the query won't let me add the 5th
row. Any suggestions? Thanks
DS
 
Hi,
I've never had that problem with the grid.
Maybe someone else could offer some advice.

Of course you could always go into SQL View(View menu) and study what's there
and then just add another OR statement.
 
Back
Top