Results 1 to 3 of 3
  1. #1
    duckduck is offline Novice
    Windows XP Access 2003
    Join Date
    May 2012
    Posts
    2

    ReOrdering ID values


    I currently have A form to input some data into a table. each record has an ID number which simply displays the current record number (ie. 1,2,3,4,...20,21,22...) When I delete a record there is a gap between the numbers (i.e. deleting record 2 would give me 1,3,4,5....). What I am looking at doing is simply to update the records after the deletion so that my table has no missing ID numbers (i.e. 1,2,3,4,...).

    I have looked at using a query to update the values but I have been unable to do this because I cannot get it to recognize which value is missing.
    I have also looked into adding part of vba code after the record has been deleted.

    What is probably best?, and how do I do it? I am still a newbie at access...

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Why is the gap a concern? Is this an autonumber field? Is this the primary key and is the value saved in dependent tables?
    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.

  3. #3
    tanvi is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    100
    I would like to suggest you to visit this article link for more details on ReOrdering the ID values: http://www.fontstuff.com/mailbag/qaccess02.htm
    It will help you to understand the problem with solution as well.

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

Similar Threads

  1. Replies: 2
    Last Post: 05-17-2012, 03:52 PM
  2. Reordering Columns In Access
    By samanthaM in forum Access
    Replies: 1
    Last Post: 05-12-2012, 11:34 AM
  3. Replies: 0
    Last Post: 07-26-2011, 02:03 PM
  4. Replies: 3
    Last Post: 04-04-2010, 05:26 PM
  5. Replies: 1
    Last Post: 03-27-2010, 06:13 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
  •  
Other Forums: Microsoft Office Forums