Problems with Dcount function

  • Thread starter Thread starter martin_watts
  • Start date Start date
M

martin_watts

I have an unbound report which contains a number of text boxes using the
dcount function to count records for statistical purposes. These mostly
work ok apart from some boxes where I need to count students who fall within
certain age groups who then need to be subdivided into new or repeat
students. All I am getting is #error.

=DCount("[AGE]","learners & courses 2","[AGE] >55 and <66 and [NEW/REPEAT]
='N'")

This is to cont the number of records new students who are aged between 56
and 65. [AGE] and [NEW/REPEAT] are calculated fields from an underlying
query (learners & courses).

Please someone, save my sanity ... why isn't it working?

TIA

Martin
 
martin_watts said:
I have an unbound report which contains a number of text boxes using the
dcount function to count records for statistical purposes. These mostly
work ok apart from some boxes where I need to count students who fall
within
certain age groups who then need to be subdivided into new or repeat
students. All I am getting is #error.

=DCount("[AGE]","learners & courses 2","[AGE] >55 and <66 and [NEW/REPEAT]
='N'")

This is to cont the number of records new students who are aged between 56
and 65. [AGE] and [NEW/REPEAT] are calculated fields from an underlying
query (learners & courses).

Please someone, save my sanity ... why isn't it working?

TIA

Take a Valium and try this ;-)

=DCount("[AGE]","learners & courses 2","[AGE] > 55 and [AGE] < 66 and
[NEW/REPEAT]='N'")

Tom Lake
 
Thanks Tom, got it to work fine. Just as well ... the valium bottle was
nearly empty :-)

Martin

Tom Lake said:
martin_watts said:
I have an unbound report which contains a number of text boxes using the
dcount function to count records for statistical purposes. These mostly
work ok apart from some boxes where I need to count students who fall
within
certain age groups who then need to be subdivided into new or repeat
students. All I am getting is #error.

=DCount("[AGE]","learners & courses 2","[AGE] >55 and <66 and [NEW/REPEAT]
='N'")

This is to cont the number of records new students who are aged between 56
and 65. [AGE] and [NEW/REPEAT] are calculated fields from an underlying
query (learners & courses).

Please someone, save my sanity ... why isn't it working?

TIA

Take a Valium and try this ;-)

=DCount("[AGE]","learners & courses 2","[AGE] > 55 and [AGE] < 66 and
[NEW/REPEAT]='N'")

Tom Lake
 
Back
Top