+ Reply to Thread
Results 1 to 2 of 2

Manual Autonumber - Access

  1. #1
    Forum Contributor
    Join Date
    01-18-2017
    Location
    Poznań, Poland
    MS-Off Ver
    2016
    Posts
    139

    Manual Autonumber - Access

    Hi everyone,

    I would like to ask you how can I (if possible) to create a form based on a table that one field is filled with the number that is higher than previous record in a table.

    Basically I would like to create something like Autonumber but if I set Autonumber then if I delete a raw Autonumber will show me next number and I want to add a number that will show me + 1 value of existing number of records.

    I mean:
    If I have records from 1 to 120 and I delete the record number 120 I want that next record had number of 120 and not 121 like it would be with Autonumber type.

    thank you very much for your help in advance.

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,169

    Re: Manual Autonumber - Access

    are you trying to save on numbers? There a lots of them.
    Why not just use autonum and get 121? The computer nor data doesn't care.

    Otherwise you must write code to constantly look for a gap.
    but you can just get the dMAX(field)
    I =dMAX(field)
    I = I + 1 'the NEW key

    so why waste the time/energy when autonum does it all for free.

+ 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] If x, autonumber, if y x value .1, x value.2 etc
    By Pirvu Vali in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 11-19-2018, 04:32 AM
  2. Vba for Autonumber
    By Anto_BT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-20-2016, 08:31 AM
  3. [SOLVED] Block Macros manual access on users
    By brainzlp in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-06-2016, 12:57 PM
  4. [SOLVED] Trying to autonumber
    By nonstopcrunchy in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 08-29-2013, 02:51 PM
  5. autonumber in access not starting at 1
    By bsaimsc in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 10-16-2012, 09:55 AM
  6. Replies: 1
    Last Post: 12-17-2008, 09:24 AM
  7. Autonumber
    By jonnygrim in forum Excel General
    Replies: 2
    Last Post: 07-17-2008, 05:22 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