MS Access Mark Duplicates in order of appearance - using the function RankOfDup: (SELECT Count(*) ...)

Posted by veska stoyanova on Stack Overflow See other posts from Stack Overflow or by veska stoyanova
Published on 2012-10-05T09:20:34Z Indexed on 2012/10/05 9:37 UTC
Read the original article Hit count: 274

Filed under:
|
|

I'm trying to create Ranking that shows the sequence of agreements for the two fields Customers and Agreements. The number for agreements must be unique, whereas customers can repeat. The formula

    RankOfDup: (SELECT Count(*)      FROM Data a      WHERE a.customer=Data.customer And a.agreement >= Data.agreement)

Works beautifully but after this query with columns Agreement, Customer and RankofDup, I need to create crosstab that transposes the RankofDub. It works when I make the table first and then create query but my data is too large so I'm trying to put the select query with the ranking in a crosstab query. However, when I try to do this Access gives error message that

 microsoft jet ... doesn't recognise Data.customer?

Any ideas how I can fix this?

© Stack Overflow or respective owner

Related posts about ms-access

Related posts about ranking