I have a field that is comma separated like so.... IB, TSS, WCOB
It can have one, two, or three values comma separated.
I have no issue if there are one or two values, but am having trouble
if the field conains the three values.
This is the code.
ictr = InStr(x, ",")
If ictr > 0 Then ' there is more than 1
first_value = Mid$(x, 1, ictr - 1)
Call Add_Current_Record(strMetric, first_value, rsMaster!ID)
second_value = Mid$(x, ictr + 1, 10)
Call Add_Current_Record(strMetric, second_value, rsMaster!ID)
next_value = InStr(second_value, ",")
If next_value > 0 Then
third_Value = Mid$(second_value, next_value + 1, 10)
Call Add_Current_Record(strMetric, third_Value, rsMaster!I
End If
Endif
I need to use Instr to pull it apart. I can handle the first split
It can have one, two, or three values comma separated.
I have no issue if there are one or two values, but am having trouble
if the field conains the three values.
This is the code.
ictr = InStr(x, ",")
If ictr > 0 Then ' there is more than 1
first_value = Mid$(x, 1, ictr - 1)
Call Add_Current_Record(strMetric, first_value, rsMaster!ID)
second_value = Mid$(x, ictr + 1, 10)
Call Add_Current_Record(strMetric, second_value, rsMaster!ID)
next_value = InStr(second_value, ",")
If next_value > 0 Then
third_Value = Mid$(second_value, next_value + 1, 10)
Call Add_Current_Record(strMetric, third_Value, rsMaster!I
End If
Endif
I need to use Instr to pull it apart. I can handle the first split