allora spiegazione
sul testo della combobox inserisci il nome del tuo atrezzo
nell'itemdata inserisce il progressivo cosice facendo
appena cliccki su un valore della combo hai a disposizione il codice associato
rivate Sub Carica_Oggetto()
On Error GoTo GestioneErrore:
Source = "SELECT cod_partecipante,partecipante.descrizione as descrizione,tipo_partecipante.descrizione_tipo as tipo FROM partecipante,tipo_partecipante WHERE tipo_partecipante.cod_tipo = partecipante.cod_tipo order by descrizione"
rs.Open Source, conn
Me.CBB_Oggetto.Clear
Do While rs.EOF = False
Me.CBB_Oggetto.AddItem rs("descrizione") & " " & "(" & rs("tipo") & ")"
Me.CBB_Oggetto.ItemData(CBB_Oggetto.NewIndex) = rs("cod_partecipante")
rs.MoveNext
Loop
rs.Close
Exit Sub
GestioneErrore:
Call Scrivi_Errore(Now, "Carica_oggetto", Err.Description)
End Sub