Results 1 to 3 of 3
  1. #1
    Alex1s85 is offline Novice
    Windows 10 Access 2021
    Join Date
    Feb 2023
    Posts
    1

    Count running Occurrence in one column

    Hello guys!



    I am a very beginner in access and i have stuck in something simple really simple in excel.

    I have a table with just one column and i need to count the running occurrence and to create a new column as below:

    IDs Desired outcome
    ID1000133R ID1000133R-1
    ID1000136R ID1000136R-1
    ID1000136R ID1000136R-2
    ID1000195R ID1000195R-1
    ID1000195R ID1000195R-2
    ID1000227R ID1000227R-1
    ID1000239R ID1000239R-1
    ID1000273R ID1000273R-1
    ID1000375R ID1000375R-1
    ID1000375R ID1000375R-2
    ID1000375R ID1000375R-3

    In excel i would get the Desired Outcome with this: A2&"-"&COUNTIF($A$2:A2,A2).

    I tried something like DCount("[IDs]","MyTable","IDs=" & [IDs]) but it didn't work. - Data Type is ShortText

    Any help would be just valuable!

    Thank you!



    Desired outcome

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    See if you can make post 2 here work for you
    https://www.access-programmers.co.uk...-query.274257/
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Requires a unique record identifier field. If not already in table, add an autonumber field as the RepPK field in the example. Use whatever name you want. Also review http://allenbrowne.com/ranking.html and https://stackoverflow.com/questions/...nter-per-group
    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.

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

Similar Threads

  1. Running Count or Row Count
    By fredy in forum Access
    Replies: 7
    Last Post: 11-06-2018, 11:14 AM
  2. Replies: 8
    Last Post: 12-02-2017, 02:32 PM
  3. Running Count Query Help
    By MJD in forum Queries
    Replies: 4
    Last Post: 07-12-2017, 08:01 AM
  4. Replies: 3
    Last Post: 03-02-2015, 09:50 AM
  5. Running Count Query
    By monkey2003 in forum Queries
    Replies: 0
    Last Post: 09-21-2009, 12:24 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