Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    Chakota is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2020
    Posts
    9
    The DB you posted gave me the solution I was looking for, thank you, but have one additional questions. How could this be changed to continue showing the Number of Yes response in a field as you set it up, but add an additional field to also counts the Number of NA responses separately?

  2. #17
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Modify function to take an argument:
    Code:
    Public Function fnCount(sCat) As Integer
    Dim ctrl As Control
        For Each ctrl In Me.Controls
            If ctrl.ControlType = acComboBox Then
                If ctrl.Properties.Item("Tag") = "x" And Nz(ctrl, "") = sCat Then
                    fnCount = fnCount + 1
                End If
            End If
        Next
    End Function
    

    Call function in textboxes:
    =fnCount("Yes")
    =fnCount("NA")

    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #18
    Chakota is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2020
    Posts
    9
    Thank you, this is exactly what I needed!

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 11-25-2019, 11:54 AM
  2. Replies: 6
    Last Post: 02-10-2017, 08:21 AM
  3. Replies: 5
    Last Post: 12-17-2014, 09:51 PM
  4. Count of specific number
    By samirmehta19 in forum Access
    Replies: 3
    Last Post: 05-20-2013, 02:29 PM
  5. COUNT Group Count Records COUNT FUNCTION
    By PMCOFFEY in forum Access
    Replies: 9
    Last Post: 11-09-2012, 09:40 PM

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