Print multiple data fields (pre-formated) into a text box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • auchia
    New Member
    • Nov 2006
    • 1

    Print multiple data fields (pre-formated) into a text box

    I am trying to make a database application. Users will input data into a number of fields(saved to an access database) and then click a button to populate a text box with all the data entered in a predetermined format. I.E.:

    User types in name, street address, city, state, and zip into five different boxes.
    They could then hit a button and a sixth box would take the data and display it like

    name
    street address
    city, state zip

    It would format it on multiple lines and add commas or other characters in between the sets of data.

    Any hints or directions to information on doing this would be appreciated.

    Chris
    (I am using VB 2005)
  • albertw
    Contributor
    • Oct 2006
    • 267

    #2
    Originally posted by auchia
    I am trying to make a database application. Users will input data into a number of fields(saved to an access database) and then click a button to populate a text box with all the data entered in a predetermined format. I.E.:

    User types in name, street address, city, state, and zip into five different boxes.
    They could then hit a button and a sixth box would take the data and display it like

    name
    street address
    city, state zip

    It would format it on multiple lines and add commas or other characters in between the sets of data.

    Any hints or directions to information on doing this would be appreciated.

    Chris
    (I am using VB 2005)
    hi
    make your new textbox 'multiline' and use something like:
    text1.text = Name & vbCrLf & Street & vbCrLf & City & ", " & State & " " & Zip

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Originally posted by albertw
      hi
      make your new textbox 'multiline' and use something like:
      text1.text = Name & vbCrLf & Street & vbCrLf & City & ", " & State & " " & Zip
      You might also consider using the vbNewline constant rather than vbCrLf. Same value, I believe, but a more "readable" name.

      Comment

      Working...