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

looping through a column data

Status
Not open for further replies.

mxo

Programmer
May 20, 2005
51
ZA
hi All

How can i do a loop through the entire column in a form when exwcuting this code below

if txtPaymentType.text = "Cash" And txtCustomerName.text = txtTradingName.text then
txtShipTo.text = txtCustAddress.text
end if

 
What is the type of object/control that the columns belong to?
DataTable? Listview?
 
it is a dataset table
 
Code:
Dim tbl As DataTable
Dim clm As DataColumn

tbl = yourDataSet.Tables("YourTableName")

'Loop each column here
For Each clm In tbl.Columns
   'Get columname:
   Msgbox(clm.ColumnName)
Next

Regards,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top