Results 1 to 3 of 3
  1. #1
    Delta223 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    38

    How to restrict a randomly assigned autonumber to 4 digits?

    Hi,



    I am using an autonumber set to random but do not like the length of the numbers it chooses. It also chooses negative numbers sometimes (-23827439) I would like to restrict the autonumber to display 4 digit positive numbers. Is there any way to do this?

    Thanks

  2. #2
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    You should let the autonumber do it's auto-increment without manipulating it in any way. Then have a number type field which you can then manipulate.

    The only time I've seen autonumber values such as (-23827439) is when replication was used. One big reason I avoid replication. If you do use replication, it's very important not to try and manipulate the autonumber values. MSAccess uses this 'hit and miss' random type method to avoid duplicated/orphaned records which I've personally never liked.

  3. #3
    Delta223 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    38
    I'm still fairly new to this application so I'm not sure what replication is but I will take a look, thanks

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

Similar Threads

  1. Replies: 3
    Last Post: 11-24-2010, 06:33 PM
  2. Replies: 21
    Last Post: 11-21-2010, 12:01 PM
  3. Replies: 2
    Last Post: 09-27-2010, 02:17 PM
  4. Replies: 1
    Last Post: 10-28-2009, 11:16 AM
  5. Replies: 0
    Last Post: 09-19-2009, 03:29 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