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 retrieve data from diffrent textbox to put in one field

To retrieve data from diffrent textbox to put in one field

Scheduled Pinned Locked Moved Visual Basic
csharpvisual-studiotutorial
4 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.
  • Z Offline
    Z Offline
    zaimah
    wrote on last edited by
    #1

    I'm new in VB.Net. I want to generate document number in this format i cannot make the date format starting with year so i make 3 text box each is year, month n day. how to make 3 items from date, custID and running_no put in one field call docNo. i'm using Microsoft Visual Studio .NET

    C 1 Reply Last reply
    0
    • Z zaimah

      I'm new in VB.Net. I want to generate document number in this format i cannot make the date format starting with year so i make 3 text box each is year, month n day. how to make 3 items from date, custID and running_no put in one field call docNo. i'm using Microsoft Visual Studio .NET

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

      zaimah wrote:

      i cannot make the date format starting with year

      The way to do this is the overload of the ToString method that lets you specify the format with a format string like YYYYMMDD.

      zaimah wrote:

      how to make 3 items from date, custID and running_no put in one field call docNo.

      Assuming the are all textboxes docNo.Text = date.Text + custID.Text + running_no.Text

      zaimah wrote:

      i'm using Microsoft Visual Studio .NET

      Well, obviously. Telling us the version number may help, but we know you're using visual studio. I suspect you'd benefit from working through a book on VB.NET, it would cover things like how ToString is overloaded, and how to add strings to each other.

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      Z 2 Replies Last reply
      0
      • C Christian Graus

        zaimah wrote:

        i cannot make the date format starting with year

        The way to do this is the overload of the ToString method that lets you specify the format with a format string like YYYYMMDD.

        zaimah wrote:

        how to make 3 items from date, custID and running_no put in one field call docNo.

        Assuming the are all textboxes docNo.Text = date.Text + custID.Text + running_no.Text

        zaimah wrote:

        i'm using Microsoft Visual Studio .NET

        Well, obviously. Telling us the version number may help, but we know you're using visual studio. I suspect you'd benefit from working through a book on VB.NET, it would cover things like how ToString is overloaded, and how to add strings to each other.

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        Z Offline
        Z Offline
        zaimah
        wrote on last edited by
        #3

        Thanks a lot for ur reply. It really help me a lot.

        1 Reply Last reply
        0
        • C Christian Graus

          zaimah wrote:

          i cannot make the date format starting with year

          The way to do this is the overload of the ToString method that lets you specify the format with a format string like YYYYMMDD.

          zaimah wrote:

          how to make 3 items from date, custID and running_no put in one field call docNo.

          Assuming the are all textboxes docNo.Text = date.Text + custID.Text + running_no.Text

          zaimah wrote:

          i'm using Microsoft Visual Studio .NET

          Well, obviously. Telling us the version number may help, but we know you're using visual studio. I suspect you'd benefit from working through a book on VB.NET, it would cover things like how ToString is overloaded, and how to add strings to each other.

          Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          Z Offline
          Z Offline
          zaimah
          wrote on last edited by
          #4

          hi, i have used the formula that u gave. it works, but there's one problem. i use docNo = System.DateTime.Now.ToString("yyyyMMdd") + Kod.Text + (values from field 'run_no' from 'table runNo') how to add values from other table?

          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