Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Leamington Spa, Warwickshire, England
    Posts
    136
    Thanks
    0
    Thanked 0 Times in 0 Posts

    restart Autonumberin (XP / 2003)

    I have created a small database for someone and entered fake data to test the relationship. They insist that the auto number must start at 0. Is there anyway i can solve this without re-doing the whole database?

    Regards

    Michelle

  2. #2
    Star Lounger
    Join Date
    Sep 2002
    Location
    Hastings, Sussex, England
    Posts
    67
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: restart Autonumberin (XP / 2003)

    Michelle,

    the only way I know to handle this is to create a new table. Copy the structure of your table, change the name of the original (for later deletion), then give the new table the correct name. Or, change the name of the original, then copy the structure to a new table with the original name. Don't forget to check that all indexes have also transferred to the new table.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: restart Autonumberin (XP / 2003)

    Delete all records.
    Create a new query in design view.
    Don't add any table.
    Add a column:

    Dummy: 0

    Select Query | Append Query.
    Specify the table as target.
    Specify the AutoNumber field in the Append to line.

    Note: if the table contains required fields, you must add columns for these, with arbitrary dummy values of the appropriate type.

    Run the query (Query | Run...)
    You can discard the query, or save it if you want to be able to repeat this.
    Compact the database. You *must* do this before adding new records!

    The autonumber will start at 1 again, as if it was brandnew (not at 0).

  4. #4
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Leamington Spa, Warwickshire, England
    Posts
    136
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: restart Autonumberin (XP / 2003)

    Thanks thats brill!

Posting Permissions

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