Limiting my result set in VB
So I can fill the combobox I have going in Visual Studio just how I want
with ALL results with the following:
Dim pnum As New List(Of String)
For Each polnumber As InsuredDataSet.Claims_InsuredRow In
Me.InsuredDataSet.Claims_Insured
pnum.Add(polnumber.Policy_Number)
Next
pnum.Reverse()
Me.Policy_NumberComboBox.DataSource = pnum
Awesome. Now I want to limit the pnum by taking what was input/selected
from Insured_NameTextBox on the form and only returning the Policy_Number
with a matching Insured_Name. I figure this can be performed with an If
statement, but everything I try (stringcompare, InsuredName_TextBox =
Me.InsuredDataSet.ClaimsInsured, etc.) either doesn't limit the results OR
limits the results entirely so nothing shows up. Any idea where to put the
If statement and what should be compared?
No comments:
Post a Comment