I have a Listbox that contains item numbers. I need to perform an action if the Item number entered on a Customer Order Line contains one that is in the Listbox. If I try the following, I get an error that QCItemList is not declared. I know I am missing something here, but not sure how I actually need to declare the Listbox. Can anyone offer a suggestion on this?
Sub QualityHoldOn()
Dim sCustNum As String = ThisForm.PrimaryIDOCollection.GetCurrentObjectProperty("Adr0Name")
If sCustNum.Contains("Rangeline") Then
Dim myVariable As String = ThisForm.Components("ItemEdit").Value
For x As Integer = 0 To QCItemList.Items.Count -1
If QCItemList.Items(x).Contains(myVariable) Then
ThisForm.Components("cbQualityHold").Enabled = True
ThisForm.Components("cbQualityHold").Value = "1"
ThisForm.Components("AllowOnPickListEdit").Enabled = False
ThisForm.Components("AllowOnPickListEdit").Value = "0"
End If
Next
End If
End Sub