E
esn
I'm trying to summarize some vegetation data that involves putting the
trees into categories and classes based on their diameter and their
"status" (live versus dead). To get a count of the treees in each
category/class at each site in each year, I'm using a query that sums
an IIf statement that contains the criteria for each category. I'm
using this setup instead of simply counting the ID field so that the
query will return zeros for sites that don't have any trees in that
category (If I enter the criteria independently and then count the ID
field I'll get blanks where no records match the criteria). Here's an
example of the Sum(Iif(... function I'm trying to apply:
Sound Snags 24-36: Sum(IIf(60.96<[Trees]![DBH (cm)]<=91.44 And [Trees]!
[Status]="d" And [Trees]![Decay Class]<4,1,0))
For some reason the first of the three criteria is not being applied -
is my syntax screwed up? In the results I get a count of all the
trees with status=d and decay class<4, regardless of the value in the
"DBH (cm)" field.
Any ideas what I'm doing wrong?
trees into categories and classes based on their diameter and their
"status" (live versus dead). To get a count of the treees in each
category/class at each site in each year, I'm using a query that sums
an IIf statement that contains the criteria for each category. I'm
using this setup instead of simply counting the ID field so that the
query will return zeros for sites that don't have any trees in that
category (If I enter the criteria independently and then count the ID
field I'll get blanks where no records match the criteria). Here's an
example of the Sum(Iif(... function I'm trying to apply:
Sound Snags 24-36: Sum(IIf(60.96<[Trees]![DBH (cm)]<=91.44 And [Trees]!
[Status]="d" And [Trees]![Decay Class]<4,1,0))
For some reason the first of the three criteria is not being applied -
is my syntax screwed up? In the results I get a count of all the
trees with status=d and decay class<4, regardless of the value in the
"DBH (cm)" field.
Any ideas what I'm doing wrong?