Results 1 to 4 of 4
  1. #1
    KNap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2013
    Posts
    28

    Reports that count or add up everything

    Hi



    I am self taught (so please be gentle in your explanation) and want to be able to sum or count everything in one sheet.

    I am able to do that normally, but in this section there are a few drop downs and check list items. Also I have four fields I want to add up... so I wondered how I would do that?

    So the four fields are called Diagnosis/Diagnosis 2/Diagnosis 3/Diagnosis 4
    Each field is a drop down list which is the same for each.

    I want to add up the number of people that have Anxiety in any of the fields.

    Would it be =sum([Diagnosis]="Anxiety"+[Diagnosis 2]="Anxiety"+ [Diagnosis 3]="Anxiety"+[Diagnosis 4]="Anxiety")

    Or is there an easier way?

    Also I want to count the number of times a tick has been added in a field by multiple clients. So I have a check list of mental health symptoms which each client can tick as many as apply to them. If I wanted to count the number of ticks in "Aggressive/violent towards others" column how would I do that in a report please?

    Thanks in advance

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,910
    Your structure is all wrong.
    You should have a table of Diagnosis linked to the PatientID in the Patient table and then just count those with Anxiety or whatever

    Same with the tickbox options.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    KNap is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2013
    Posts
    28
    The structure is this

    Tables:
    Client Info
    Housing History
    Offending History
    Alcohol
    Drugs
    Physical Health
    Mental Health

    Everything is linked by client reference. Every client completes each form. On the mental health form there has to be room for four diagnosed issues, so I did the four different fields with the same drop down list.

    Does this make more sense?

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,784
    Can you show a pic of your relationships if you created them? I'm not convinced it is all wrong but that's only because I'm thinking your explanation might only relate to the structure of a form plus I have no idea what a "sheet" is in this case. Maybe it's a table with lookup fields, and that would be a different kettle of fish.
    A direct answer might be: try
    =sum([Diagnosis]="Anxiety")+Sum([Diagnosis 2]="Anxiety")+Sum([Diagnosis 3]="Anxiety")+Sum([Diagnosis 4]="Anxiety")
    but that's a wild guess because of not knowing about the design.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 17
    Last Post: 09-12-2020, 01:28 AM
  2. Replies: 3
    Last Post: 01-13-2020, 10:04 PM
  3. Replies: 2
    Last Post: 06-30-2016, 06:38 PM
  4. COUNT Group Count Records COUNT FUNCTION
    By PMCOFFEY in forum Access
    Replies: 9
    Last Post: 11-09-2012, 09:40 PM
  5. Help with line count in reports.
    By OldCityCat in forum Reports
    Replies: 0
    Last Post: 04-11-2011, 08:21 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums