Ghoztriderr
New member
- Joined
- Jan 4, 2013
- Messages
- 4
- Programming Experience
- 1-3
Hi,
I've setup a simple array that I would like to loop through and compare the data in a text box on the form with one of the indexes in the array. If the field data matches one of the entries in the array I'll have it run some random code. Here is my code for reference:
When it reaches the For Each statement it is looping through each letter in the array index, for instance M, A, R, Y instead of looping through the complete word "Mary" and comparing it against the text field. Can someone point me in the right direction? Thanks in advance for any help!!
I've setup a simple array that I would like to loop through and compare the data in a text box on the form with one of the indexes in the array. If the field data matches one of the entries in the array I'll have it run some random code. Here is my code for reference:
VB.NET:
'Create array for holding group members
Dim Members(1) As String
Members(0) = "Mary"
Members(1) = "Larry"
'Compare AccountName field to array
For Each Mem In Members(2)
If Mem = AccountName Then
nav.SelectSingleNode("/my:myFields/my:Current_User/my:CVT_Group", NamespaceManager).SetValue(TRUE)
End If
Next
When it reaches the For Each statement it is looping through each letter in the array index, for instance M, A, R, Y instead of looping through the complete word "Mary" and comparing it against the text field. Can someone point me in the right direction? Thanks in advance for any help!!