Count, Dcount, or Ab(Sum())?

  • Thread starter AnhCVL via AccessMonster.com
  • Start date
A

AnhCVL via AccessMonster.com

Hi all,

I have a report that contain 3 type of data and I want to count a total of
each type of data and display it under the page footer, I've tried count()
and Dcount() but no luck. Below is the statement I used:

=DCount("*","Main Log Table","[Type]='Letter' AND [Sig_Date]='null'")

=DCount("*","Main Log Table","[Type]='Letter' AND [Sig_Date]<>'null'")

=DCount("*","Main Log Table","[Type]='Letter' AND [Sig_Date]=' '")
=DCount("*","Main Log Table","[Type]='Letter' AND [Sig_Date]<>''")

Each letter, if signed, have a signature date, and I want to count the number
of letter that were signed and well as the one that was not signed and
display them in 2 text boxes on the page footer, is it possible? by the way,
the source of the report is the table name "Main Log Table".
 
J

John Spencer

Try

=DCount("*","[Main Log Table]","[Type]='Letter' AND [Sig_Date] is null")

=DCount("*","[Main Log Table]","[Type]='Letter' AND [Sig_Date] is Not null")


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
D

Duane Hookom

It is a little confusing since you mention three types of data and a count
for each. Then you mention 2 text boxes. I don't know how you intend to get 3
values into 2 text boxes.

Anyway, I would probably use a subreport with a Record Source of
SELECT [Type], Sum(Abs(Sig_Date Is Null)) as NoDate,
Sum(Abs(Sig_Date Is Not Null)) as HasDate
FROM [Main Log Table]
GROUP BY [Type];
 
A

AnhCVL via AccessMonster.com

Thanks John and Duane, It work very well now. thanks again

Mark

Duane said:
It is a little confusing since you mention three types of data and a count
for each. Then you mention 2 text boxes. I don't know how you intend to get 3
values into 2 text boxes.

Anyway, I would probably use a subreport with a Record Source of
SELECT [Type], Sum(Abs(Sig_Date Is Null)) as NoDate,
Sum(Abs(Sig_Date Is Not Null)) as HasDate
FROM [Main Log Table]
GROUP BY [Type];
[quoted text clipped - 13 lines]
display them in 2 text boxes on the page footer, is it possible? by the way,
the source of the report is the table name "Main Log Table".
 

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