Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2011
    Posts
    7

    Sequentially number records in a table field

    I am an novice user of access, so it would help to get an answer that includes code and not simply a point in the right direction.

    I would like to number [field1] sequentially from 1 to EOF in [table1] where [field2]="some value."



    Any help will be appreciated.

  2. #2
    ajetrumpet is offline Banned
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    when you ask for code, you won't get it, at least not from me.

    in terms of the question, or semi-question here, you're going to have to do it through a recordset, if I'm reading this right. But the question IS vague, for sure. care to give any more information?? of even an image of the table in question??

  3. #3
    RuralGuy's Avatar
    RuralGuy is online now Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,898
    In spite of the admonition: http://allenbrowne.com/ranking.html
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  4. #4
    ajetrumpet is offline Banned
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by RuralGuy View Post
    In spite of the admonition: http://allenbrowne.com/ranking.html
    great link!!

  5. #5
    Join Date
    Mar 2011
    Posts
    7

    Post

    To be clearer:

    Suppose this table (Table1) with two fields and the following data:

    Field1 Field2
    (Null) Y
    (Null) N
    (Null) Y
    (Null) N
    (Null) Y

    How would I go about sequentially numbering Field1 where Field2=Y to produce this outcome:

    Field1 Field2
    1 Y
    (Null) N
    2 Y
    (Null) N
    3 Y

    Thanks,
    Kent

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

Similar Threads

  1. Replies: 6
    Last Post: 03-22-2011, 08:22 PM
  2. about number field in table
    By spradhan in forum Access
    Replies: 1
    Last Post: 02-19-2010, 12:44 PM
  3. Replies: 2
    Last Post: 01-22-2010, 03:53 PM
  4. Replies: 1
    Last Post: 02-05-2009, 04:53 PM
  5. Replies: 1
    Last Post: 01-31-2009, 10:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums