Quantcast
Channel: Visual Basic Tips and Tricks
Viewing all articles
Browse latest Browse all 2212

DisplayMember Combobox

$
0
0

Ciao a Tutti, chiedo ancora il Vs/prezioso aiuto difronte a quanto espongo:

è associato all'evento click del Button1 presente nel form il codice qui sotto riportato il quale carica la (combobox) cmbVend solo del campo "Nome"  ma non del campo "Cognome" provenienti dalla tabella VENDITORI.

Sicuramente errata la parte di cod sottolineata....ma non riesco ad immaginare come poter intervenire.

Grazie per i suggerimenti....

 

Using Conn As New OleDbConnection(Dbstring)
            Conn.Open()
            Using selezione As New OleDbDataAdapter("SELECT * FROM VENDITORI ORDER BY Nome", Conn)
                Using ds As New DataSet
                    selezione.Fill(ds, "VENDITORI")
                    With cmbVend
                        .DataSource = ds.Tables("VENDITORI")
                        .DisplayMember = "Nome"& "Cognome"
                        .ValueMember = "IdVenditore"
                    End With
                End Using
            End Using
        End Using 


Viewing all articles
Browse latest Browse all 2212