Hi All, I need help with the following error I'm getting when I try run a report linked to a query. The query loads and works fine, however on the report I get the above titled error with the following calculated fields in the report. if I delete these fields, the report loads fine.
=Count(IIf([FieldA]=1 And [FieldB]=1,1)
=Count(IIf([FieldA]=2 And [FieldB]=1,1)
=Count(IIf([FieldA]=3 And [FieldB]=1,1)
=Count(IIf([FieldA]=4 And [FieldB]=1,1)
or
=Count(IIf([FieldA]=1 And [FieldB]=1,1,0)
=Count(IIf([FieldA]=2 And [FieldB]=1,1,0)
=Count(IIf([FieldA]=3 And [FieldB]=1,1,0)
=Count(IIf([FieldA]=4 And [FieldB]=1,1,0)
So I assume it's erroring when it comes across a FieldA or FieldB value that do not meet the criteria because when I view the query, FieldA does not have any records with the value 2 or 3.
There are no nulls in either of those fields as all the fields are populated with data... except that [FieldA] only has entries 1 or 4. What's annoying is the same report works when I link it to a similar query with different data, the only difference being that in that other query, the records in it have either of the values 1,2,3 and 4 in [FieldA]
Please help??
=Count(IIf([FieldA]=1 And [FieldB]=1,1)
=Count(IIf([FieldA]=2 And [FieldB]=1,1)
=Count(IIf([FieldA]=3 And [FieldB]=1,1)
=Count(IIf([FieldA]=4 And [FieldB]=1,1)
or
=Count(IIf([FieldA]=1 And [FieldB]=1,1,0)
=Count(IIf([FieldA]=2 And [FieldB]=1,1,0)
=Count(IIf([FieldA]=3 And [FieldB]=1,1,0)
=Count(IIf([FieldA]=4 And [FieldB]=1,1,0)
So I assume it's erroring when it comes across a FieldA or FieldB value that do not meet the criteria because when I view the query, FieldA does not have any records with the value 2 or 3.
There are no nulls in either of those fields as all the fields are populated with data... except that [FieldA] only has entries 1 or 4. What's annoying is the same report works when I link it to a similar query with different data, the only difference being that in that other query, the records in it have either of the values 1,2,3 and 4 in [FieldA]
Please help??