Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.


Auto populate a textbox from a combobox selection

Auto populate a textbox from a combobox selection

I'm new to programming, currently I'm working on a windows form application in Visual Studio 2008. So far I have 1 form that contains a combobox and a textbox, the combobox accesses a column in an access database table (Items). I've got this working fine by setting the datasource and display member properties of the control.

What I'm having trouble doing is auto populating the textbox with the data in the next column (Qty) based on the user selection in the combobox. Any help would be greatly appriciated.



RE: Auto populate a textbox from a combobox selection

To refer to any column in a ComboBox, use


where x is the 0-based number of the column (so the first column is column(0) the second is column(1), etc.) Well, that is how it works in MS Access... I am assuming Visual Studio would work similarly.

If you do a keyword search you will find lots of information on this subject.

RE: Auto populate a textbox from a combobox selection

I'm familiar with multi column comboboxes in access, vs 2008 doesn't include a multicolumn combobox control if you can believe that. I wish it were that easy. Thanks for trying I appriciate it.


RE: Auto populate a textbox from a combobox selection

Ahhh... you said 'next column' so I thought that meant the combo box had more than one column. You mean the next field in the table?

Since I obviously am not familiar with Visual Studio, I will now shut up.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close