Re: Report Sum If <=



Chris

If I'm understanding what you are trying to do, do it in the query. First
create the new expression (your IIF statement). Then, in the
Selection/Criteria "cell", enter "Yes".

Paraphrased in English, create a calculated value of either "Yes" or "No",
based on the size of my [sum of hours] field, then only return rows where
this calculated value is "Yes".

Regards

Jeff Boyce
Microsoft Office/Access MVP

"ChrisG" <ChrisG@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:00A20660-8688-4670-8629-5B884B84ECED@xxxxxxxxxxxxxxxx
I want to make a report from a query that extracts coded events L, LX etc
and
the hours associated with these codes. I need help with the correct
syntax
for this expression.

sum([sum of hours])
IIf ([sum of hours] <= 24, "Yes", "No")

I would like to display only those entries who meet the criteria or flag
the
YES entries.

--
ChrisG


.



Relevant Pages

  • Re: general question about how best to cache expensive query results
    ... feeds and sometimes don't include the field ... That was my first attempt to limit the entries ... would be the result of that original query. ... presenting the underlying problem and the business requirements. ...
    (comp.databases)
  • Re: Today and Yesterday
    ... I use this query to show me how many entries are in table Information_coll ... > RogueIT, ... > Steve Schapel, Microsoft Access MVP ...
    (microsoft.public.access.queries)
  • general question about how best to cache expensive query results
    ... The question is that when I have a query like: ... entries to those that are newer than a certain date, ... ascending order in order of creation and find the highest id that's at ... as well as dealing with values having different types. ...
    (comp.databases)
  • Re: Access Table Sorting/Query Last Function
    ... I've put in a number of test entries to ensure it works, ... of the Lastin your totals query. ... I've been designing a database that basically works off two tables. ... I've done this so that I can pull the last entered ...
    (microsoft.public.access.tablesdbdesign)
  • Re: ComboBox
    ... >My combobox is based on a query that links 5 tables together. ... if I had 7 entries for the other ... >the query shows the 7 entries as 49 entries because of the table structure. ... recordsource property; and it can have only one Row Source. ...
    (microsoft.public.access.gettingstarted)