DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2006

    Combo box and Text Box binding using Access

    I have a combo box that populates with customers from an Access DB, I have the value member set as the customer code. I also have a few textboxes that I want populated with some more infomation from the database, Customer number, address, etc. How can I bind the text boxes so that when I select a customer from the combo box, the related infomation fills the text boxes?

  2. #2
    Join Date
    Aug 2004
    Orange, California
    Make sure to drag down the additional fields within the query designer for the
    combobox's row source property, Then set the control source for each related
    text box to: = combobox1.Column(1) or (2) or ...
    Where Column(0) is CustomerID, Column(1) is the next item, and so on...

  3. #3
    Join Date
    Aug 2004
    Orange, California
    Here is a small Contact And Vendor Forms Example Where you can
    reference additional fields from the combo box record source.

    Requested by jchristensen
    Last edited by Ron Weller; 05-30-2008 at 10:17 PM.

  4. #4
    Join Date
    May 2008

    Thumbs up Just what I needed....

    I was trying to use a query as a rowsource for a combo-box and also send data to a text box simultaneously, but the only thing that ever updated was the combo-box. Your solution fixed things right up! I had to think about it for awhile before I understood the why of it. When using a query as a source for a control, all of the data generated goes to the bound control. Using the query to also populate a text box meant that either a.) a separate instance of the query was started which had generated no data because it didn't have any input from the combo-box, or b.) the second instance of the query never actually ran because there was nothing to initiate it. Either way the text box received no data; but thanks to your solution my form is now functioning properly and I have a better understanding of how Access operates.

Similar Threads

  1. MS Access Report w/ dynamic size Rich Text Box
    By petegis in forum VB Classic
    Replies: 3
    Last Post: 09-04-2006, 04:03 PM
  2. Help with .Net combo box
    By jherndon in forum .NET
    Replies: 1
    Last Post: 12-23-2005, 11:05 AM
  3. Text box validate on Access Please help
    By benz84 in forum VB Classic
    Replies: 2
    Last Post: 11-14-2005, 04:38 AM
  4. Saving text to a db using combo list box
    By Patty_5 in forum VB Classic
    Replies: 0
    Last Post: 05-22-2001, 07:55 AM
  5. Query help in Access Combo Box
    By Larry Muller in forum VB Classic
    Replies: 1
    Last Post: 02-24-2001, 10:12 PM

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
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

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

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.