Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto populate a textbox from a combobox selection

Status
Not open for further replies.

Joe1961

Technical User
Mar 26, 2012
2
US
Hello,
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.

Thanks,

Joe
 

To refer to any column in a ComboBox, use
Code:
[ComboBoxName].[Column](x)
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.
 
Thanks,
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.

Joe
 

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top