Results 1 to 3 of 3

Thread: drop box

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    Greensboro,NC USA
    Posts
    9

    Post

    I am designing a customer invoice form in VB. I have created textboxes for customer input such as 1st name, last name, and address. I want to create a drop box for selection of state. How do I set this up?

    Thanks from a rookie!

  2. #2

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    Greensboro,NC USA
    Posts
    9

    Post

    I have chosen to use a combobox so that the user can select the State of their choice, but am not sure how to set write the code.

    Would appreciate any suggestions.


  3. #3
    Addicted Member jcouture100's Avatar
    Join Date
    Aug 1999
    Posts
    141

    Post

    You will use the AddItem method of the combobox control to
    add the states to your list.

    Example: This will add the state abbreviations for Alabama,
    California, Nebraska, and South Dakota to a combobox
    named cboBox1.

    cboBox1.AddItem ("AL")
    cboBox1.AddItem ("CA")
    cboBox1.AddItem ("NE")
    cboBox1.AddItem ("SD")

    You could set up a text file or database table that
    contains all the state names you want and then open the
    file and loop thru the info to load your combobox.

    Hope this helps.

    JC

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width