Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Can I Begin Autonumber >1

Discussion in 'Information Technology' started by Ben, Nov 18, 2005.

  1. Ben

    Ben
    Expand Collapse
    Guest

    In my database therer is now a need to have a table that begins the primary
    key ID that begins with a number greater than 10,000.
    The reason for this is because now we have to link two tables with similar
    information (formerly was just one table) to a reference table, and it will
    fall over if two id's are the same. I thought if I could make the ID's
    different there wouldn't be an issue with this. Any ideas would be
    appreciated. Many thanks.
     
  2. Loading...


  3. Ben

    Ben
    Expand Collapse
    Guest

    I apologise, my searching needs work. Here is a reply from Steve Schapel that
    answered my question:


    Marko,

    Open a blank query in design view, and enter 99999 in the Field row of
    the first column of the query design grid. Make it an Append Query
    (select Append from the Query menu), and nominate your table. In the
    Append To row of the grid, enter the name of the Autonumber field. The
    SQL of the query will look something like this....
    INSERT INTO [YourTable] ( YourAutoNumberField )
    SELECT 99999 AS Expr1;

    Run the query (click the toolbar button with the red [!] icon). Close
    the query, open the table, and selete this record just added. After
    that, the next record added will have 100000 in the autonumber field.

    --
    Steve Schapel, Microsoft Access MVP
     
  4. rico

    rico
    Expand Collapse
    Guest

    I think this article should help:

    http://www.mvps.org/access/tables/tbl0005.htm

    THT

    Rico

    Note: that many questions have already been answered (like yours), have a
    search through the forum before asking your question.

    "Ben" wrote:

    > In my database therer is now a need to have a table that begins the primary
    > key ID that begins with a number greater than 10,000.
    > The reason for this is because now we have to link two tables with similar
    > information (formerly was just one table) to a reference table, and it will
    > fall over if two id's are the same. I thought if I could make the ID's
    > different there wouldn't be an issue with this. Any ideas would be
    > appreciated. Many thanks.
     

Share This Page