If you don't have the ability to add the name to your Database table
then the best way to do it is set a variable equal to the combobox
SelectedIndex and send that.
Put something like this code in the click event of a btnSave:
Dim iAdresType as Integer
iAdresType = cboTypeAdres.SelectedIndex
SelectedIndex is zero based so you can put the combobox items in order
that they are on the database.
You could also use a Select Case statement that looks at the
cboTypeAdres.Text and sends the appropriate SelectedIndex.
Hope that helps!
trevisc
Scotty wrote:
Hi, I need some info
How to return the value from the database
My combobox
Me.cboTypeAdres.Items.Add("Type Adres")
Me.cboTypeAdres.Items.Add("Leverancier")
Me.cboTypeAdres.Items.Add("Klant")
the value in the database = 0 ; 1 or 2
How to return the text using the value index so that the view is the bounded
text ?
Many thanks in advance
Marc