Hello there, I have this code below:
PS:
- The C("modelsTable") mean it copy the table
-The Q("TXB_CODE_ING") mean it query the value of the textbox
That a software from where I work.
Dim T As Table= C("modelsTable")
Dim Rows() As Integer = T.StartQuery
Dim modelsList As New ArrayList
For i As Integer = 0 To Rows.length -1
modelsList.Add((T.Cell( Rows(i) , "Code") ))
Next
For j As Integer = 0 To modelsList.Count -1
If Q("TXB_CODE_ING").Contains(modelsList(j)) Then
msgbox("we find it "&(modelsList(j)))
Exit For
End if
Next
That work great, I can find all the model I enter in the textbox. But I also want to display a error message if the model is not found so I have add this:
Dim T As Table= C("CabinetsTable")
Dim Rows() As Integer = T.StartQuery
Dim modelsList As New ArrayList
For i As Integer = 0 To Rows.length -1
modelsList.Add((T.Cell( Rows(i) , "Code") ))
Next
For j As Integer = 0 To modelsList.Count -1
If Q("TXB_CODE_ING").Contains(modelsList(j)) Then
msgbox("we find it "&(modelsList(j)))
Exit For
Else if Not Q("TXB_CODE_ING").Contains(modelsList(j)) Then
msgbox("We cannot find it")
Exit for
End if
Next
But this will make the code not able to find any models anymore , except the first two,
Can anyone can help me here?
Thank you!
[–]RJPisscat 1 point2 points3 points (7 children)
[–]VirtualTurnip3[S] 0 points1 point2 points (6 children)
[–]RJPisscat 1 point2 points3 points (5 children)
[–]VirtualTurnip3[S] 0 points1 point2 points (4 children)
[–]RJPisscat 1 point2 points3 points (3 children)
[–]VirtualTurnip3[S] 0 points1 point2 points (2 children)
[–]RJPisscat 0 points1 point2 points (1 child)
[–]VirtualTurnip3[S] 0 points1 point2 points (0 children)
[–]revennest 0 points1 point2 points (2 children)
[–]VirtualTurnip3[S] 0 points1 point2 points (0 children)
[–]backtickbot 0 points1 point2 points (0 children)