Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2010
    Posts
    29

    Unanswered: How to count data from another query by date

    I have a query that is used to pull data to the report by between dates to include writeups and yes, no, and N/A's per question (combobox). Works great.

    I created another query to pull the totals of yes, No, and N/A's by column off of that query. Here is one example of one of the questions..

    Code:
    Doc28-51No: Sum((Abs([Doc #28-51]="No")))
    Doc28-51Yes: Sum((Abs([Doc #28-51]="Yes")))
    Doc28-51NA: Sum((Abs([Doc #28-51]="N/A")))

    I created another query off of this query to total the yes, no and n/a to place at the report footer by sub-report from this query giving me the totals I need. It will pull all the column totals but not by the between dates I need.

    Code:
    Total No: Sum([Doc2No]+[Doc25No]+[Doc12-5No]+[Doc28-51No])


    I need the query to pull by the between dates from the report query when I enter it in.

    Is there a way that this can be done. I hope I explained it well enough...

  2. #2
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    You can do that in the report itself. Just add a textbox to the Report Footer and put this in the ControlSource:

    =Sum([Doc2No]+[Doc25No]+[Doc12-5No]+[Doc28-51No])

  3. #3
    Join Date
    Nov 2010
    Posts
    29
    The form text boxes that have Yes, No and N/A (drop down) are Doc #2, Doc #12-5 and Doc #25 to name just a few that go tot he table.

    I entered the code you gave me as you suggested which I have tried in the past but it doesn't work. I want to add all the Yeses, No's and N/A's from various text boxes separately in the report.

    I really appreciate any help I can get on this. Been working on this for a week and no closer than I started. Thanks!

  4. #4
    Join Date
    Nov 2010
    Posts
    29
    I entered in the text box this code in the report footer section:

    =Count([Doc #2]+[Doc #25]+[Doc #12-5]+[Doc #28-51]=Yes)

    All I am getting is the total records instead of the total yeses. Is there something I am missing.

Posting Permissions

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