Hello, someone who can help me
I want to add a unique value to a field, with different delimited values, if it does not exist, yes, I will send a text message that already exists
Example:
Dim a, b AS String
a = TextField1.Text // field values "1;2;3;"
b = TextField2.Text // Case 1 or 5
// Look for a unique value delimited by;
If a = b Then // CASE 1
msg "it already exists" // TextField2.Text = 1;2;3;
else
msg "add value"
End if
If a = b Then // CASE 2
msg "it already exists"
else
msg "add value" // TextField2.Text = 1;2;3;5;
End if
Thanks
TextField1.Text = "1,05,120"
TextField2.Text = "1"
Dim Words() As String
Dim tempStr As String
tempStr = ReplaceAll(TextField1.Text, " ","")
Words = Split(tempStr, ",")
If Words.IndexOf(TextField2.Text) < 0 Then
MsgBox "does not exist"
Else
MsgBox "exists" // OK
End if