S
Steve
I have a multiselect list box populated with a list of tests (test 1, test 2,
test 3, etc)
Next to each line of the list box I have a combobox to determine the timing
of each test. The combo boxes are named cboTime1, cboTime2, etc,
corresponding to the row of the list box to which they are adjacent. The user
selects a test by clicking the list box and then selects a time for each test
selected. I want to then concatenate this info into a text box. I have the
following code:
Private Sub UpdateAddTest_Click()
Dim strFollowTestList As String
Dim strTestList As String
Dim ListBxCount As Integer
Dim ListBxCounter As Integer
For ListBxCounter = 0 To ListBxCount
If [lstOtherTesting].Selected(ListBxCounter) = True Then
strFollowTestList = strFollowTestList [lstOtherTesting].Column(0,
ListBxCounter) & " in " & [cboTime & ListBxCounter]
lstOtherTesting.Selected(ListBxCounter) = False
End If
Next ListBxCounter
strTestList = "At that visit I have requested that the following testing
be performd: " & strFollowTestList & "."
End Sub
I want procedure to determine which cboTime (i.e. cboTime1 or cboTime2 ect)
to use based on the list box row number selected but it doesn't recognize my
reference to the cboTime control when I code it as '[cboTime &
ListBxCounter]'. Any suggestions on how to do this? Thanks.
test 3, etc)
Next to each line of the list box I have a combobox to determine the timing
of each test. The combo boxes are named cboTime1, cboTime2, etc,
corresponding to the row of the list box to which they are adjacent. The user
selects a test by clicking the list box and then selects a time for each test
selected. I want to then concatenate this info into a text box. I have the
following code:
Private Sub UpdateAddTest_Click()
Dim strFollowTestList As String
Dim strTestList As String
Dim ListBxCount As Integer
Dim ListBxCounter As Integer
For ListBxCounter = 0 To ListBxCount
If [lstOtherTesting].Selected(ListBxCounter) = True Then
strFollowTestList = strFollowTestList [lstOtherTesting].Column(0,
ListBxCounter) & " in " & [cboTime & ListBxCounter]
lstOtherTesting.Selected(ListBxCounter) = False
End If
Next ListBxCounter
strTestList = "At that visit I have requested that the following testing
be performd: " & strFollowTestList & "."
End Sub
I want procedure to determine which cboTime (i.e. cboTime1 or cboTime2 ect)
to use based on the list box row number selected but it doesn't recognize my
reference to the cboTime control when I code it as '[cboTime &
ListBxCounter]'. Any suggestions on how to do this? Thanks.