Results 1 to 2 of 2
  1. #1
    Access2007_NewUser is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2012
    Posts
    1

    How to assign a specific value to each record within a query


    Hello. I created a query which contains a long list of dates in descending order. I would like to add another field to the same query that will assign a value of 0 to the top (most recent) date and subtract a value of 1 from each of the remaining dates. The query results would be: Row1: 04/22/12 | 0; Row2: 04/21/12 | -1; Row3 04/20/12 | -2; Etc. Any guidance would be greatly appreciated. Code samples would be helpful too since I am pretty new to this. Thank you.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    Could you explain why you need to do this? A negative ranking/numbering is new idea.

    Review these links for info on ranking and numbering records.
    http://support.microsoft.com/kb/120608
    http://allenbrowne.com/ranking.html
    http://forums.aspfree.com/microsoft-...ge-440477.html
    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: 7
    Last Post: 04-17-2012, 11:53 AM
  2. Replies: 8
    Last Post: 01-13-2012, 08:20 AM
  3. Open form to a specific record from a query
    By chris.williams in forum Forms
    Replies: 11
    Last Post: 10-06-2011, 04:15 PM
  4. Replies: 6
    Last Post: 02-09-2010, 07:53 AM
  5. need query to assign sales leads to reps??
    By RickM in forum Queries
    Replies: 0
    Last Post: 03-12-2009, 02:44 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