Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2003
    Posts
    100

    Question Unanswered: Can I alter the autonumber?

    Hi I have come up with a strange error I have a table where one of the fields has a autonumber on it, and everything has worked fine for ages.
    However the last number it succefully apply was 11429, then for no apperent reason it's now trying to use 10428!! Which is failing over due to dupilcate records.

    Is their anyway I can manually set the autonumber, or does anyone else know of any way round this problem.

    Thanks Ed

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    i know this is the "Other PC Databases" forum and not the Paradox, Filemaker, or Access forum, but would this by any chance be an Access database?

    because if it is, the answer is yes, you can
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jul 2003
    Posts
    100
    Originally posted by r937
    i know this is the "Other PC Databases" forum and not the Paradox, Filemaker, or Access forum, but would this by any chance be an Access database?

    because if it is, the answer is yes, you can
    Yep, sorry have I posted this in the wrong place, opps. It is a Access database. You say their is a way to change the autonumber. please tell me, my eternal gratetude! Ed

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    insert a dummy row and provide a higher number for the autonumber field
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Dec 2003
    Location
    Bristol, England
    Posts
    29
    Hi,

    The easiest way to renumber an autonumber column in Access is, in the Design mode, delete the column(actually a row in the Design view) containing the autonumber (to do this you must first remove the Key designation if any - which is most likely). Save the database. Then Insert a new column (called Row in the design view) and redisignate it as Autonumber and Key (if necessary).

    Provided there are records in the table (most likely) the above will work perfectly, but if you have used the autonumbers as an identity reference, make sure the table is sorted by the autonumber fields BEFORE you carry out the above. Also check to see if your last entry carries the correct autonumber for identity purposes.

    If you simply enter a blank record and manually update the autonumber, you may be storing up problems for the future.
    Last edited by taxes; 02-27-04 at 18:32.
    taxes

Posting Permissions

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