I have a list box where the user might need to select two items which builds
up an sql string. Another part of the function only requires the first item.
here is the code :
For Each varItems In Me.ListDOS.Item sSelected
If strMods = vbNullString Then
strMods = "=" & """" & Me.ListDOS.Colu mn(1, varItems) & """"
Else
strMods = "=" & """" & Me.ListDOS.Colu mn(1, varItems) & """"
End If
Next varItems
I am not sure how to amend it so that it reaches only the first item, stores
it to strMods and then drops out of the loop.
regards in advance.
Peter
up an sql string. Another part of the function only requires the first item.
here is the code :
For Each varItems In Me.ListDOS.Item sSelected
If strMods = vbNullString Then
strMods = "=" & """" & Me.ListDOS.Colu mn(1, varItems) & """"
Else
strMods = "=" & """" & Me.ListDOS.Colu mn(1, varItems) & """"
End If
Next varItems
I am not sure how to amend it so that it reaches only the first item, stores
it to strMods and then drops out of the loop.
regards in advance.
Peter
Comment