Results 1 to 2 of 2
  1. #1
    sergi117 is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2018
    Posts
    30

    Label number against specific category and only one record

    Essentially it is exactly as in the title. I'm thinking for a potential workaround of a larger query.
    Is it possible given:

    Name...Empl__ID
    John.....101
    John.....101
    John.....101

    To create a query which adds a column which places either a number 1 against only one of these records or sequentially numbers them?

    What I want is
    Name...Empl_ID...Number


    John.....101..........4
    John.....101..........3
    John.....101..........2
    John.....101..........1

    The key idea is to make it so there is one distinct record I can define by this number. So even just putting 1 number next to one record is fine. I know in this instance it'd be simpler to use select distinct, but unfortunately in reality the data has some other key information which prevents that. See the image if you'd like more of an idea
    .Click image for larger version. 

Name:	Table2.PNG 
Views:	10 
Size:	9.2 KB 
ID:	35752
    Thanks!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Calculating row number for each group in a query is a common topic. Review https://accessexperts.com/blog/2015/...ing-in-access/
    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. Replies: 2
    Last Post: 08-25-2017, 08:16 AM
  2. Replies: 2
    Last Post: 07-28-2017, 12:08 PM
  3. The Category ID number System
    By Lou_Reed in forum Access
    Replies: 2
    Last Post: 10-05-2015, 12:18 PM
  4. Replies: 5
    Last Post: 05-10-2014, 09:24 AM
  5. Count number of defects per category
    By HeadGasket in forum Queries
    Replies: 5
    Last Post: 02-10-2012, 04:13 PM

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