select case

pb21

Registered User.
Local time
Today, 08:14
Joined
Nov 2, 2004
Messages
122
I want to use a select case statement but not sure how to evaluate part of the case:

Select case Me.CBIndProduct.Column(2)
Case ... Here the word commission is to be identified which is left 10 of Me.CBIndProduct.Column(2)

case else

end select

the string for commission is longer than 10 characters as the string Me.CBIndProduct.Column(2) will return Commission for product...


kind regards in advance
 
Just use the left function? or am I missing something?
 
well, if it only has those 2 cases, then

Select Case Left(Me.CBIndProduct.Column(2), 10)

should do the trick. If you want to do more cases, and its not the always the pftmost 10, then you will need an if statement. so

If (left(Me.CBIndProduct.Column(2), 10) == "Commission") then
...
Elseif (some other condition)
....
else
...
end if
 

Users who are viewing this thread

Back
Top Bottom