Class VersionPageV Private Sub ProductComboBox_Loaded(sender As Object, e As RoutedEventArgs) Handles ProductComboBox.Loaded ''Dim pvQuery As String = "SELECT * FROM " & DB_PRODUCT & '' " JOIN " & DB_VERSION & '' " ON " & DB_PRODUCT & "." & DB_PRODUCTID & '' "=" & DB_VERSION & "." & DB_PRODUCTID & '' " WHERE " & DB_VERSIONID & " LIKE " & IdToUpdate 'ProductComboBox.SelectedItem = ProductComboBox.Items(1) ' ManageDb.ExecuteProductQuery(pvQuery)(0) 'Dim i = 0 'For Each item In ProductComboBox.Items ' ' If ((Product)item.DB_ProductID.Equals(IdToUpdate)) Then ' If (ProductComboBox.Items(i).Equals(IdToUpdate)) Then ' ProductComboBox.SelectedItem = ProductComboBox.Items(i) ' End If ' i = i + 1 'Next End Sub End Class