DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How do I add info from an existing DB to text boxes?

  1. #1
    Erin Guest

    How do I add info from an existing DB to text boxes?


    HELP!! I don't have a lot of experience, but I am writing a program that
    will take employee records from an Access DB and populate a Data ComboBox
    (Employee Name). When a new name is selected, the proper info should fill
    into the text boxes. I can only get the info for the first name in the DB
    to show up. When I select a new name, the info for the first name still
    stays in the boxes. I don't know what I am doing wrong.


  2. #2
    Antonio Guest

    Re: How do I add info from an existing DB to text boxes?


    "Erin" <emw100@home.com> wrote:
    >
    >HELP!! I don't have a lot of experience, but I am writing a program that
    >will take employee records from an Access DB and populate a Data ComboBox
    >(Employee Name). When a new name is selected, the proper info should fill
    >into the text boxes. I can only get the info for the first name in the

    DB
    >to show up. When I select a new name, the info for the first name still
    >stays in the boxes. I don't know what I am doing wrong.
    >


    try this:
    this is just a demonstration of what u can use
    click the command to fill the combo and then start moving the itens on the
    combo. u will see that the listindex number is always changing. U can use
    it to know where u will get the information in a recordset to populate the
    textboxs. Hope i helped. If u need anthing else exc99@aeiou.pt.

    Private Sub Combo1_Click()
    MsgBox Combo1.ListIndex

    End Sub

    Private Sub Command1_Click()
    Combo1.AddItem ("test1")
    Combo1.AddItem ("test2")
    Combo1.AddItem ("test3")
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center