Results 1 to 6 of 6
  1. #1
    Maxland is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2020
    Posts
    6

    The query

    Hi,
    I have a question for my query in which I have two fields Date and status (in the status only 3 values ​​YES / NO / Other). I would like to use a query to count me the number of appearances after the statute in one line.

    I have a question if it is possible to have all statuses in one line because now I used Group by. I have added my example in the attachment.
    Attached Files Attached Files

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Q1:
    select YesReply:Iif([status]="Yes",1,0), NoReply:Iif([status]="No",1,0), OtherReply:Iif([status]="Other",1,0) from table

    Q2:
    make a sum query of Q1.



  3. #3
    Maxland is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2020
    Posts
    6
    Thank you for your answer, but I have a problem with Q1 and Q2 (I'm not that advanced in Accesa). I have a question if you can do it on my attached example

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Something like this?
    Click image for larger version. 

Name:	Count1.png 
Views:	18 
Size:	41.3 KB 
ID:	43022
    Attached Files Attached Files

  5. #5
    Maxland is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2020
    Posts
    6
    Thank you very much for your help

  6. #6
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You are very welcome...

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

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