Problems with Dcount function

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
 
T

Tom Lake

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
 
M

martin_watts

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top