selection criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I write a criteria as follow:
<100, and between 101 to 199 and between 251 to 999 and between 1000 to 5000

Cheers,
John
 
I think you mean you want to return records where the value is in any of the
ranges (Logical OR)


<100 Or between 101 AND 199 OR between 251 And 999 OR between 1000 and 5000

In a where clause

WHERE (SomeField <100 OR SomeField between 101 AND 199 OR SomeField between
251 And 999 OR SomeField between 1000 and 5000)

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
John said:
Thanks for quick fix! How can I sumup the value of the selection?

Chees,

Click the button at the top of the screen that looks like this ? and you'll
see a new row appear in the query builder. In that row, in the column you
want to sum, change the selection there from "Group By" to "Sum." If this
is not the same field as the one you used in the Where clause, make sure you
change the text in that column from "Group By" to "WHERE."

HTH;

Amy
 
If you want to sum the same field you are applying criteria to:

-- Select View: Totals from the menu bar
-- Change GROUP BY to WHERE under the field you are applying criteria to
-- Add the field again
-- Change Group By to SUM

If you are showing other fields and they are GROUP BY fields, then the sum
will be for each of the groups.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Hi John,

Did the following:
-- Select View: Totals from the menu bar
-- Change GROUP BY to WHERE under the field you are applying criteria to

How Can I add a field again in the column where I am applying the criteria?
-- Add the field again
-- Change Group By to SUM


Regards,
 
Various ways. Here are four that I can think of.

--Double click on the field name in the table display
--Type the field name in the field display
-- Select Table from the dropdown in the table "cell" and then select the
field from the dropdown in the field "cell"
-- Drag the field from the table display to the grid

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top