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

How To Loop through an array of combo boxes and print 1

Status
Not open for further replies.

maupiti

Programmer
Oct 27, 2003
240
US
Access 2003
How To Loop through an array of combo boxes and print
its value.

There are 5 combo boxes and their names and values are

CB_Symbol_1 = AB
CB_Symbol_2 = CB
CB_Symbol_3 = MB
CB_Symbol_4 = XZ
CB_Symbol_5 = IB

The code that does not work is
MsgBox Len( '""& Me!CB_Symbol_" & I & "' )

The code above suppose to display the value of
each of the combo boxes.

////////////////////////////////////////

Private Sub Example
Dim I as Integer

For I = 1 To 5
MsgBox "Me!CB_Symbol_" & I
MsgBox Len( '"& Me!CB_Symbol_" & I & "' )
Next I
End Sub
 
MsgBox Me.controls("B_Symbol_" & I)
MsgBox len(Me.controls("B_Symbol_" & I))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top