Re: Count IIf - too complex to be evaluated

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thanks Duane - I tried that too and it also didn't work - in fact I have torn
this apart every way from here to Sunday. Just now I realized the problem
and boy do I feel foolish! It turns out that in my query I had not included
the tables that have the look up data (such as Enf_Category) and since the
correct data kept showing up in my report I never thought about it. Redid
the query and report and now it's working great - hope someone else benefits
from my mistake!

"Duane Hookom" wrote:

> Try:
> =Sum(Abs([Enforcement Category]="Minor"))
>
> --
> Duane Hookom
> MS Access MVP
>
>
> "carriey" <carriey@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:C4916F49-2E74-489F-AF2B-02F0961EA9D6@xxxxxxxxxxxxxxxx
> > Hello, posted a couple of days ago "counts / sums in query / crosstab or
> > report" but didn't have much luck and have been spending my time googling
> > for
> > solutions but still must be on the wrong track.
> >
> > I have a report that is grouped on 4 levels (geographical breakdowns) and
> > I
> > need to be able to count the details at each level (for inspections). I
> > have
> > a count of the number of Inspections in the detail but cannot figure out
> > how
> > to break it down further. For example, one column on the report is for
> > the
> > Enf_Category (of the inspection) and it can have 5 possible answers. I
> > need
> > to count the number of each Enf_Category at all 4 of my levels (District,
> > Subdistrict, Area, Field)
> >
> > I've tried a number of things that didn't work at all but finally through
> > checking out a lot of sites I thought I had it:
> >
> > =Count(IIf([Enforcement Category]="Minor",0))
> >
> > in the footers of my report but I get the error message "the expression is
> > typed incorrectly or is too complex to be evaluated". I've also tried
> > creating additional columns in my query for expressions but get the same
> > error message.
> >
> > I've read some bits about breaking down the query into smaller chunks and
> > doing subreports - I'm just not sure what to break out? The detail? I do
> > have a date parameter set on this as well (which I have to have) and I'm
> > wondering if that could be causing me problems?
> >
> > Thanks for your help again!
>
>
>
.



Relevant Pages

  • Re: OutputTo to Excel question
    ... I can't help you with the macro error message as I don't use macros. ... the result from a query. ... Save a query that pulls the same data as the report. ...
    (microsoft.public.access.macros)
  • RE: Report prints data twice on two different pages
    ... I'm not sure I fully understand what a "totals query" is nor do I totally ... Thanks again Duane! ... FROM Customers AS C INNER JOIN Appointments As A ON C.customer_id = ... My main report is based on a query that is based on the main table only. ...
    (microsoft.public.access.reports)
  • Re: Error Message when running report
    ... Sorry there was a typo in my re-typing of the error message. ... The query runs and provides the correct data with no ... report, or the query that the report is based on. ... Whenever you change code or references, your should always compile ...
    (microsoft.public.access.reports)
  • RE: Still have hope but need more help. First Question, more to fo
    ... Good afternoon Duane, ... Microsoft Access MVP ... in a query and am using that query as the Control Source for the report. ... the report, I have put the information for each column in the Detail section. ...
    (microsoft.public.access.reports)
  • Re: Sum Function - sum option not available for column of numbers
    ... Thanks very much Duane. ... If you want to include the actual looked up value in your query, ... I didn't have any luck with the report. ... It looks to me like the sum function in the report is adding up the ID ...
    (microsoft.public.access.queries)