Hey im still new to VB.NET, but I have code that works as follows below. Performs a search depending on the field specified in the dropdown. However, I am looking for a way for it to find duplicate records from the field specified, and then list them in a listbox if any are found. The user will then double click the correct one and then it will be selected. I guess the first step is me asking what I should 1st start with. How can I perform duplicate checking? Any tips, pointers, examples appreciated. Thanks
VB.NET:
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
Dim intposition As Integer
Select Case SearchBYBox.SelectedIndex
Case 0
objDataview.Sort = "LastName"
Case 1
objDataview.Sort = "FullName"
Case 2
objDataview.Sort = "StudentID"
End Select
intposition = objDataview.Find(SearchBox.Text)
If intposition = -1 Then
StatusBar1.Text = "Record Not Found."
Else
StatusBar1.Text = "Record Found."
sspanelSearch.Visible = False
SearchBox.Text = ""
objcurrencyManager.Position = intposition
End If
Showposition()
End Sub