Private Sub CompanySelectionPicker_ItemSelected _ (ByVal sender As Object, _ ByVal e As OakLeaf.MM.Main.Windows.Forms.mmPickerItemSelectedEventArgs) _ Handles CompanySelectionPicker.ItemSelected ' Find the position of the primary key selected in the Picker Dim companyIdSelected As Integer = _ CInt(e.dsSelectedItems.Tables.Item(0).Rows(0).Item("CompanyId")) ' The user selected an item from the Picker. ' Locate a row in the grid based on the ' Sort column value(s) supplied in a string. Try Dim intRow As Integer Dim dv As DataView = _ Me.oCompany.GetCurrentDataSet.Tables("Companies").DefaultView Dim dr As DataRow ' Set the Sort prop. with Col(s) to search [REQUIRED]. dv.Sort = "CompanyId" ' Set the index of the found row or -1 if not found intRow = dv.Find(companyIdSelected) ' Handle row not found or found at index greater than available If intRow < 0 Or intRow > dv.Count Then MsgBox("Row not found based on the criteria provided.") Else ' Return the matching row dr = dv(intRow).Row ' Use the form's BindingContext object to set the position Me.BindingContext _ (CompanyDataset, CompanyDataset.Tables(0).TableName). _ Position = intRow ' Update form fields with new value selected Me.CompanyFormSetFieldValues() End If Catch exFE As FormatException MsgBox(exFE.Message & " ...Find argument setting. " _ & vbCrLf & companyIdSelected.ToString) Catch ex As Exception MsgBox(ex.ToString) End Try