Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to make auto number start from 2000

How to make auto number start from 2000

Scheduled Pinned Locked Moved Database
databasetutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    ivo75
    wrote on last edited by
    #1

    How to make auto number start from 2000 not in 1. I use MS Access 2003 database

    W A 2 Replies Last reply
    0
    • I ivo75

      How to make auto number start from 2000 not in 1. I use MS Access 2003 database

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      Hi, Have you noticed for example this article: How to programmatically create an AutoNumber field and set its "New Values" property to Random[^]. Hopefully that gives you a good starting point. However there are very rarely reasons why setting starting point would be meaningful. Typically the value itself is meaningless as long as it's unique.

      The need to optimize rises from a bad design.My articles[^]

      I 1 Reply Last reply
      0
      • W Wendelius

        Hi, Have you noticed for example this article: How to programmatically create an AutoNumber field and set its "New Values" property to Random[^]. Hopefully that gives you a good starting point. However there are very rarely reasons why setting starting point would be meaningful. Typically the value itself is meaningless as long as it's unique.

        The need to optimize rises from a bad design.My articles[^]

        I Offline
        I Offline
        ivo75
        wrote on last edited by
        #3

        I create my database in MS Access before use it.

        W 1 Reply Last reply
        0
        • I ivo75

          I create my database in MS Access before use it.

          W Offline
          W Offline
          Wendelius
          wrote on last edited by
          #4

          Yes, the article covers also database creation etc, but the point is that with a little macro you can modify the properties of your tables columns. I don't have Access at the moment but I would guess that some macro like:

          CurrentDb.TableDefs("TableNameGoesHere").Fields("FieldNameOverHere").DefaultValue = "2000"

          would be worth trying.

          The need to optimize rises from a bad design.My articles[^]

          1 Reply Last reply
          0
          • I ivo75

            How to make auto number start from 2000 not in 1. I use MS Access 2003 database

            A Offline
            A Offline
            Abhinav S
            wrote on last edited by
            #5

            This[^] may help.

            The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups