+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Spammer
    Join Date
    02-26-2009
    Location
    India
    MS-Off Ver
    Outlook
    Posts
    98

    Can AutoNumber start with 10000

    Hi all,


    I making a project for that i need a database and I am taking a field AutoNumber in my database.

    So my query is Can I start the first number from 10000?

    Thanks

  2. #2
    Forum Contributor
    Join Date
    07-31-2008
    Location
    Berkshire, UK
    MS-Off Ver
    2003 & 2007
    Posts
    115

    Re: Can AutoNumber start with 10000

    It is possible but it isn't advised. To be honest I am not sure exactly how to do it anyway so if you google it I am sure you can get some code. However, in my experience, it's not a great idea to use a Primary Key or autonumber field to store a meaningful number. It's best to leave this as it is or if you specifically need this to be a certain number, enter it manually instead.

    I have spoken to people who want to create and ID field which combines text and numbers, so they create a seperate field for the text section and AutoNumber the second part of it. The same might be useful for your numeric fields.

    If this is no help, ignore me

    All the best

  3. #3
    Spammer
    Join Date
    02-26-2009
    Location
    India
    MS-Off Ver
    Outlook
    Posts
    98

    Re: Can AutoNumber start with 10000

    Thanks sim but which project i've given need the AutoNumber start with 10000.......right now m not getting any possible option but i hope i will get it soon if u've got any solution please rply......

  4. #4
    Forum Administrator
    Join Date
    03-18-2009
    Location
    India
    MS-Off Ver
    2003,2007
    Posts
    222

    Re: Can AutoNumber start with 10000

    Yes, you can.. to do this:

    Create the first table that contains the counter typefield that you want to start on another number. Don'tenter any records.Create a second table, with a single long integer number type field that has the same name as the counter field in the first table. Create a record in the second table by entering a number one less than the number you want to start the counter at in the first table. Create an append query, to append the one record in the second table to the first table,and run it Delete the second table, delete the record that you appended to the first table, and start entering data.

    Another Method:

    You can make an Append query that just appends a value
    from a parameter, to just the auto-number field (as
    long as no other fields are required), e.g.:
    Code:
    PARAMETERS [Number] Long;
    INSERT INTO tblAuto ( intNumber )
    SELECT [Number] AS Expr1;
    Also, Get the information from this site mvps.org that will help with
    Access.

    Good Luck
    ExlGuru

  5. #5
    Registered User
    Join Date
    05-09-2009
    Location
    Lincoln, UK
    MS-Off Ver
    All 2007
    Posts
    1

    Re: Can AutoNumber start with 10000

    What purpose do you need the Autonumber to fulfill by starting at 10000? Is it for an invoice / order number or something like that?

    In the past, if I've needed a number for that purpose, then I've either just reference the autnumber on a form or query, by creating a field with autonumber plus 10000 (or 9999 if you want record 1 to be 10000).

    Is there a reason that you need this number on the table?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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.2.0