943,736 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 2908
  • VB.NET RSS
Sep 20th, 2005
0

Ref. 20 textboxes on a form numerically

Expand Post »
I have a list of 20 textboxes on a form. each textbox is a record in a table. I want to loop through the textboxes if posible:

for x = 1 to 20
sStmt = "update list_table set"
sStmt += " docu = '"+??textbox(x)??+"'"
sStmt += " where id_code = "+id_code

sqlexe(sStmt, oConn)
next
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Robert Walker is offline Offline
12 posts
since May 2005
Sep 22nd, 2005
0

Re: Ref. 20 textboxes on a form numerically

Quote originally posted by Robert Walker ...
I have a list of 20 textboxes on a form. each textbox is a record in a table. I want to loop through the textboxes if posible:

for x = 1 to 20
sStmt = "update list_table set"
sStmt += " docu = '"+??textbox_x??+"'"
sStmt += " where id_code = "+id_code

sqlexe(sStmt, oConn)
next

I did get it to work with

For x = 0 To Me.tabPAGE1.Controls.Count - 1
sStmt = " document = '" + Me.tabPAGE1.Controls(x).Text + "'"
Next

but I'm looking for a way to identify a textbox with a string
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Robert Walker is offline Offline
12 posts
since May 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Having problems with adding a row to a DataSet
Next Thread in VB.NET Forum Timeline: Pass a two character





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC