Results 1 to 8 of 8
  1. #1
    Join Date
    May 2006
    Posts
    9

    Unanswered: Customized Table

    Im trying to create a customized table for Purchase Order, where Purchase Order will be the Primary Key, 5 characters number, increments and autonumber and starts with 10000.
    How do I do that?
    Thanks
    Kaylo
    Vista
    Access 2000

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Why?

    Just make an autonumber field and import a record with the number of 9999.

    But again, the more important issue is why. Every time I have seen this get implemented, it quickly gets dropped. It implies that you want to control the value of the autonumber and you can't. Autonumbers control themselves.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    May 2006
    Posts
    9
    I got an answer and it works: Thanks

    First, create a new table in design view. On the first line type, Purchase Order. with a data type of auto number and hit enter. On the bottom of the screen, look for Format and type 10000. This should start your first purchase order as 10000 and will increment 1 for each entry.

    Quote Originally Posted by StarTrekker
    Why?

    Just make an autonumber field and import a record with the number of 9999.

    But again, the more important issue is why. Every time I have seen this get implemented, it quickly gets dropped. It implies that you want to control the value of the autonumber and you can't. Autonumbers control themselves.

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    That solution doesn't actually store 10000 as the value, it just looks like it due to the formatting. Behind the formatting it still starts at 1.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,418
    Provided Answers: 7
    I wouldn't use the ID feild
    I would Ceate it own feild and then do a Dmax(...)+1 to find the next number

    but in saying that I always have the ID feild in my database but that all they are just ID feild
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  6. #6
    Join Date
    Dec 2004
    Location
    Connecticut
    Posts
    85
    I agree with StarTrekker - avoid using Autonumber as the identifier in this table.

    With business records (PO's, Invoices, Work Orders), any gaps in the numbering scheme will make auditing a nightmare. When the accounting trolls ask "Where is PO #12345?", you'll have to explain why it doesn't exist. The last thing you want is an angry accounting troll - they bite.

    Use one of the Autonumber Replacements from the Code Bank, or make one of your own.

  7. #7
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    In my experience, order numbers have always been a meaningless number used to identify my order. They should have no meaning other than to uniquely identify a single order.

    Therefore nobody in their right mind should give a rats patoot about a missing order number, especially because you're telling me this value is generated, and therefore even easier to "fake".

    Use your autonumber, start the seed at 10000 if you have to, but you should not give a damn about what the number is.
    George
    Home | Blog

  8. #8
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    ^ Agreed wholeheartedly.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •