Results 1 to 11 of 11
  1. #1
    dmaddox is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Posts
    4

    Auto number 13 numbers

    First and Foremost, absolute beginner here. Done a couple databases and worked but now I have an issue that I don't know.
    I have an autonumber that needs to be 13 characters and stay that way but increase by 1 on each record.



    I have figured out up to 10! Question is how do I get it to accept 13 characters and not get the " The value you entered does not match the number data type in this column" in which I search for answers and never figured it out.

    If not doable, then I have a field called bar code and would need it the previous record bar code to be available for the new record? So the librarian can just change the last number!

    Thanks Everyone.

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    In the properties section of your table for your particular field in the format line, put 13 zeros (ie. 0000000000000)

    See attached example
    Attached Files Attached Files

  3. #3
    dmaddox is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Posts
    4
    Quote Originally Posted by alansidman View Post
    In the properties section of your table for your particular field in the format line, put 13 zeros (ie. 0000000000000)

    See attached example
    Ok this worked, but the numbers are not autoincreasing, 1003530000001 1003530000002 1003530000003 and so on, each one stays 1003530000001 but yours is working, what am I doing wrong in my database?

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Be very careful of autonumbers. Autonumbers are meant for system use; they are meant to be UNIQUE only, and may not be incremental and may not be positive. If you need a field that means something to you, then define a separate field and control how it is incremented.

    see http://allenbrowne.com/ser-40.html
    http://allenbrowne.com/ser-26.html

    http://www.utteraccess.com/wiki/index.php/Autonumbers

  5. #5
    dmaddox is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Posts
    4
    Yes, it will be barcodes and unique to that individual. What would be your recommendation to start with 1003530000000 and then increase, now I have librarians and they will create a record or two by mistake and call me up and say.. Oops over and over.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    To reset an autonumber to 0, you have to delete existing records and do Compact and repair.

    Hopefully you are working on a test/development database.

    You're not playing with an Operational database!!!!

    I don't know anything about barcodes, but others on the forum do. Ask specific questions; get prepared and design your database to do what your business needs. Don't make decisions before you understand the problem, nor before you appreciate some of the consequences.

    People get hung up on incremental numbers.... the key to database is unique identifiers to distinguish 1 record from all others.

  7. #7
    dmaddox is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Posts
    4
    No, not an Operational Database. Just starting it and its working with the autonumbering and I already Compacted and repaired. But will research the issue with a differant format about barcoding and thanks for the help in getting this far! So far the site is wonderful!

    Thanks Orange

  8. #8
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Quote Originally Posted by orange View Post
    To reset an autonumber to 0, you have to delete existing records and do Compact and repair.
    This is no longer true in AC2007 and AC2010.

    Here is a link from Microsoft.

    http://support.microsoft.com/kb/812718

    Alan

  9. #9
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  10. #10
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    I knew. Thought you might appreciate it. BTW. You should check and see if your company subscribes to the HUP (Home User Program) through MS. I was able to upgrade at home to MS Office 2010 Pro for US$15.00

    Alan

  11. #11
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Alan,
    An interesting thought Alan, but my company is me. I've been retired from govt for 4 1/2 yrs. Perhaps there is a method???? It would be nice.

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

Similar Threads

  1. auto enter sequential numbers
    By normie in forum Access
    Replies: 5
    Last Post: 05-25-2012, 10:38 AM
  2. Replies: 1
    Last Post: 02-23-2012, 11:48 AM
  3. Renumbering Auto-Increment numbers
    By svcghost in forum Database Design
    Replies: 8
    Last Post: 02-19-2011, 08:48 AM
  4. Suggest number based on already used numbers
    By Patience in forum Access
    Replies: 3
    Last Post: 06-16-2010, 04:26 AM
  5. Replies: 2
    Last Post: 09-10-2009, 05:42 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