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. displaying autonumber in a textbox

displaying autonumber in a textbox

Scheduled Pinned Locked Moved Visual Basic
databasequestion
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.
  • M Offline
    M Offline
    mcm
    wrote on last edited by
    #1

    if the OrderNumber is an autonumber(as opposed to text) in the Order table of the database, is it possible to display this number in a textbox on loading of the order generation form? Thank you in advance!

    R 1 Reply Last reply
    0
    • M mcm

      if the OrderNumber is an autonumber(as opposed to text) in the Order table of the database, is it possible to display this number in a textbox on loading of the order generation form? Thank you in advance!

      R Offline
      R Offline
      Ray Cassick
      wrote on last edited by
      #2

      I have doen this in the past by using a separate table that only contains the autonumber feild and a column for a username. I add a new record to the table (by writing the username), to get a new invoice number, then a run a querry that grabs the top 1 from the list with that username. I then use that number in the table that contains the invoice data. Seems to work quite cleanly. Not sure just how leagle it is with regards to DB theory, but it has worked in the past.


      Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
      George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things."


      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