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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populating textboxes

Status
Not open for further replies.

greymonkey

Technical User
Jul 20, 2003
29
0
0
AU
Hi,

I have a couple of combo boxes pulling data from an Access Database.

The second combo is running off a DataView which filters the results:

Code:
        Dim tempTable As DataTable = DataSet_Ticket1.Tables(0)
        Dim tempDataView As DataView = New DataView(tempTable, "TicketGroupRef = " + cmb_Group.SelectedValue.ToString, "TicketDiscription", DataViewRowState.CurrentRows)
        cmb_Ticket.DataSource = tempDataView

I now want to fill in some text boxes with the fields of the row selected in the second combo box but cant find a command to select the feild in the database.

Am looking for something like:
Code:
txt_textBox.text = [i]DB_Table_ref[/i]([i]coloum_Name[/i])

The text boxes are not bound to anything.

Any Ideas,

Cheers.

 
Try this:

txt_textBox.text = tempDataView(cmb_Ticket.SelectedIndex).Item("ColumnName")

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day! Ye has a choice: talk like a pira
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top