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. C#
  4. Autonumber and refresh form, C sharp

Autonumber and refresh form, C sharp

Scheduled Pinned Locked Moved C#
csharpasp-nettutorialquestion
3 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
    misCafe
    wrote on last edited by
    #1

    Dear Experts, I have two questions here, first, I wanna know how to make an autonumber on C sharp (textbox). I have selected max number from a field in the table but I do not know how to make the textbox becomes an autonumber (always +1 with the max number) when I load the form. The second question, I have many forms in my small (homework) project. I open form2 from form1(form1 still actives), I add some text in form2 and I want to make form1 (ex: combox) refresh (vba calls requery) when I close form 2. Thanks for reading the entire of this passage. :) Visoth

    Chuon Visoth Angkor Wat - Cambodia asp.net - c sharp beginner

    C 1 Reply Last reply
    0
    • M misCafe

      Dear Experts, I have two questions here, first, I wanna know how to make an autonumber on C sharp (textbox). I have selected max number from a field in the table but I do not know how to make the textbox becomes an autonumber (always +1 with the max number) when I load the form. The second question, I have many forms in my small (homework) project. I open form2 from form1(form1 still actives), I add some text in form2 and I want to make form1 (ex: combox) refresh (vba calls requery) when I close form 2. Thanks for reading the entire of this passage. :) Visoth

      Chuon Visoth Angkor Wat - Cambodia asp.net - c sharp beginner

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      misCafe wrote:

      I have two questions here, first, I wanna know how to make an autonumber on C sharp (textbox). I have selected max number from a field in the table but I do not know how to make the textbox becomes an autonumber (always +1 with the max number) when I load the form.

      There is absolutely no way to do this automatically - you will have to write your own control. The only logical way I can see to do this is to have a column to show numbers, not add text to the control.

      misCafe wrote:

      The second question, I have many forms in my small (homework) project. I open form2 from form1(form1 still actives), I add some text in form2 and I want to make form1 (ex: combox) refresh (vba calls requery) when I close form 2.

      When your call to ShowDialog ends, you still have the dialog object and you can access it's properties. So, just expose the values you need, and grab and use them.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      M 1 Reply Last reply
      0
      • C Christian Graus

        misCafe wrote:

        I have two questions here, first, I wanna know how to make an autonumber on C sharp (textbox). I have selected max number from a field in the table but I do not know how to make the textbox becomes an autonumber (always +1 with the max number) when I load the form.

        There is absolutely no way to do this automatically - you will have to write your own control. The only logical way I can see to do this is to have a column to show numbers, not add text to the control.

        misCafe wrote:

        The second question, I have many forms in my small (homework) project. I open form2 from form1(form1 still actives), I add some text in form2 and I want to make form1 (ex: combox) refresh (vba calls requery) when I close form 2.

        When your call to ShowDialog ends, you still have the dialog object and you can access it's properties. So, just expose the values you need, and grab and use them.

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        M Offline
        M Offline
        misCafe
        wrote on last edited by
        #3

        Thank you so much for your explanation below. Yours, Visoth

        Chuon Visoth Angkor Wat - Cambodia asp.net - c sharp beginner

        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