Results 1 to 2 of 2
  1. #1
    Heezea is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Nov 2013
    Posts
    3

    Start: 100, increment: +10 (e.g. 110, 120), allow for future addition (e.g. 109, 115)

    I was wondering if it is possible to start a database table at 100, increment it by 10 (example: 100, 110, 120, ...) but still allow for future inclusion of non-10-incremented numbers (example: 109, 115) so I would end up with 100, 109, 110, 115, 120, ...



    The reason I would like to do this is that various statements (example: insufficient bolt length) will be tied to each number (example: 110 - insufficient bolt length), and I want to establish routine of entering the data as 3-digit numbers. I expect that 100-990 will cover most of the range, but want to be able to add to the range if needed, without going into 4-digit numbers.

    Initially, I tried entering the auto-increment number in Column A, and then a second column would take Column A * 10 + 100, but that doesn't allow me to include numbers such as 109 or start at 100.

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You really do not want to be using Autonumbers in this manner. They should not be used for anything other than to guarantee a unique identifier.
    See: http://www.utteraccess.com/wiki/index.php/Autonumbers

    If you want some sort of special counter, if you do not want to enter them manually, you will probably need to incorporate some VBA code to assign them. The logic would be something like looking up the Maximum value currently in the table, and adding 10 (and probably want to check that the hightest number is already a multiple of 10),

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

Similar Threads

  1. Replies: 3
    Last Post: 11-20-2012, 01:40 PM
  2. Replies: 5
    Last Post: 11-12-2010, 12:10 PM
  3. Future date parameter
    By normie in forum Queries
    Replies: 10
    Last Post: 08-12-2010, 09:38 PM
  4. Replies: 1
    Last Post: 07-07-2010, 04:22 PM
  5. Question about the future of Access
    By kantell in forum Access
    Replies: 0
    Last Post: 11-04-2008, 11: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
  •  
Other Forums: Microsoft Office Forums