Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2003
    Posts
    107

    Unanswered: MS Access Report Newbie Question

    might be able to get away with calc totals on thereport itself.
    Is there any way to get a count of all records that have a value in a column on my report?

    eg)if i had the following report

    DateABC Name LName XYZ
    ===============================================
    2/15/2008 John Doe asdfasdfasdf
    Jane Doe asdfasdf
    2/14/2008 Bob Barker oiuoiu

    Could I create a summary section at the bottom with totals?
    Eg) I know i can do use the control source for a text box to do something like:
    = "total records" & Count(*)

    which will give me a count of all records... in this case 3.
    But it is possible to use the same mechanism to get a count of only those records with a value in DateABC? Looking for a count of 2.

    Please and thanks.

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Try

    =Sum(IIf(IsDate(DateABC), 1, 0))
    Paul

  3. #3
    Join Date
    Feb 2003
    Posts
    107
    thanks! I'm trying to do the same thing for a checkbox field vs. a date and I can't get it to work. I'm trying the following:

    =Sum(IIf([DOE].Checked),1,0)

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Try

    =Sum(IIf(DOE = True, 1, 0))

    which can probably be shortened to

    =Sum(IIf(DOE, 1, 0))
    Paul

  5. #5
    Join Date
    Feb 2003
    Posts
    107
    Thanks Paul. I'll give that a try!

    much appreciated

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    does an Access report control have a value, if so then just sum the abs(value), alternatively you could sum the abs(column)

    a third way would be to create a hidden control on the report and sum that
    a fourth way woudl be to do some code in the group header(s) (to zero running total(s), report detail to add to your total, group footer(s) to assing the total(s) to the report.

    However these (especially 3 & 4) are not necessarily appropriate for your problem right now, but they are worth bearing in mind for future report problems.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •