+ Reply to Thread
Results 1 to 2 of 2

Number each occurrence of Multiple Criteria in a Access Query

  1. #1
    Forum Contributor
    Join Date
    11-01-2012
    Location
    NJ
    MS-Off Ver
    Excel 365
    Posts
    109

    Number each occurrence of Multiple Criteria in a Access Query

    I feel like there should be an easy way to do this and I am completely overlooking something

    Have a query in access where by I want to use the "Transaction Code" and "Fund ID" and "Security Name" and number each occurence.

    Example Line 1 is
    Transaction Code - Buy
    Fund ID - BLACK
    Security Name - Apple
    Number Each Occurrence - 1

    Transaction Code Fund ID Security Name NUMBER EACH OCCURRENCE
    Buy BLACK Apple 1
    Buy BLACK Apple 2
    Buy BLACK Apple 3
    Sell BLACK Apple 1
    Sell RED IBM 1
    Buy BLACK Apple 4
    Sell BLACK IBM 1
    Sell RED IBM 2

    I can't figure out how to get the number of occurences to work
    Any help is greatly appreciated!

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Number each occurrence of Multiple Criteria in a Access Query

    not sure if you're still looking into this, (would guess you have fixed), however, in general SQL terms I'd think of this as a ROW NUMBER & PARTITION type problem but, (to my very limited Access knowledge), this isn't available

    if you have a source field that is unique/numeric, e.g. a Auto Number PK, you could use something like the below, where Field1 is the unique/numeric field

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Set criteria of a query in Access via VBA
    By Metrazal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2023, 09:33 AM
  2. nth occurrence with multiple criteria (index/match)
    By Hlech989 in forum Excel General
    Replies: 3
    Last Post: 03-08-2019, 03:46 AM
  3. Replies: 7
    Last Post: 12-08-2016, 04:35 PM
  4. [SOLVED] Find nth occurrence with multiple criteria
    By Joe Walsh in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-05-2013, 11:09 AM
  5. Changing access query criteria from Excel
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-26-2011, 01:40 AM
  6. Next occurrence with multiple criteria.
    By aikorei in forum Excel General
    Replies: 2
    Last Post: 06-20-2011, 03:04 PM
  7. Specifying criteria in Excel for Access Query
    By Troubled User in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-17-2006, 01:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1