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. General Programming
  3. Visual Basic
  4. To generate An Autogenerated field

To generate An Autogenerated field

Scheduled Pinned Locked Moved Visual Basic
question
2 Posts 2 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.
  • S Offline
    S Offline
    Softtips2004
    wrote on last edited by
    #1

    I want autogenerated column every time I save Information. In case i delete a record then, Eg The auto generated Nos are 1 2 3 4 5, and i remove 3 and 4 then the 5th record must automatically take the place of the 3rd record(just like what happens in Excel)How do i do it?

    D 1 Reply Last reply
    0
    • S Softtips2004

      I want autogenerated column every time I save Information. In case i delete a record then, Eg The auto generated Nos are 1 2 3 4 5, and i remove 3 and 4 then the 5th record must automatically take the place of the 3rd record(just like what happens in Excel)How do i do it?

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      If the autogen'd numbers are the primary key, then you don't get to do that. Once an autogenerated number is used it is never used again, even if it has been deleted. The only way your going to accomplish this is if you generate the number yourself and keep track of which numbers have been used and which hasn't. More trouble than it's worth... RageInTheMachine9532

      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