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

Looping Question

Status
Not open for further replies.

barbs2

Technical User
Jan 24, 2003
8
IE
I am trying to create an order form in Vb. There are text boxes to allow for the entry of quantities of a product required. However they will not all be used all the time so I need a way to save info. from only the full text boxes to the database. Any ideas?? I tryed a loop using a counter but couldn't get it to work and I don't want to use loads of if statements if possible.
 
You could add the textboxes to an array and loop through that array while updating.
Greetings,
Rick
 
you could try something like:

Dim TestText As String
Dim MyTextBoxes As TextBox
For Each MyTextBoxes In frmMyForm
TestText = MyTextBoxes.Text
MsgBox "text: " & TestText, vbOKOnly
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top