Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Aug 2002
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Change autonumber with function (Access 2000)

    How can i change the autonumber in a table with a function? I want to make my autonumber of the field OrderID of the table
    Orders to begin from 7000 instead from 1.Is there any function with ADO or DAO ?
    Thank you for the help

  2. #2
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Maidstone, Kent, England
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change autonumber with function (Access 2000)

    If you want to change the value of a Autonumber then you are out of luck.

    If you want to start your Autonumbers from a certain point then check out <!post=this thread,110426>this thread<!/post>


    HTH

    Peter

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Change autonumber with function (Access 2000)

    As Peter pointed out, you can't change the value of an autonumber field once it has been assigned. And while there are ways to start numbering at a specific number other than 1, I'd suggest that if this field value is going to be exposed to the user, then maybe you don't want an autonumber anyway. What happens when a user starts a new Order (and the autonumber is assigned), then cancels. You will now have a gap in your OrderID numbers. If this is unexceptable, then don't use autonumbers.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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