SQLCMD = "SELECT * FROM VSC_PAYMENT_TYPE "
SQLCMD &= " WHERE PT_COMPANY = '" & LogonCompCode & "'"
SQLCMD &= " AND PT_BRANCH='" & LogonBranchCode & "'"
SQLCMD &= " ORDER BY PT_CODE"
DbConnect()
Dim cmdSelect As New SqlCommand(SQLCMD, _conn)
Dim reader As SqlDataReader = cmdSelect.ExecuteReader
For i = 0 To cbotype.Items.Count - 1
If Mid(cbotype.Items(i).ToString, 1, 2) = Mid(reader(0).tostring,1,2) Then
ListBox1.Items.Add(cbotype.Items(i))
End If
Next
End If