Combobox Question

  • Thread starter Thread starter Warwick Hunt
  • Start date Start date
W

Warwick Hunt

Hiya All,

Don't know if this is possible, but I need to know if after binding
infomation to a combobox a selection is made and then the resulting column
information is passed to numerous text fields...

Hope I explained this ok !

TIA

Dave
 
Use this event

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged

'And here make the ComboBox1.text value available to what ever you want

End Sub

OHM
 
Hi Dave,

And in addition to OHM, when you want your textboxes automaticly filled, you
can tell it using a kind of code like this.

(It is an example a lot of other ways are possible, and used and changed so
filled with typo's maybe).

\\\\
combobox1.BeginUpdate()
combobox1.DisplayMember = "ident"
textboxLnSample.DataBindings.Clear()
textboxFnSample.DataBindings.Clear()
cmaPerSample = CType(Me.BindingContext(dsSample.Tables(0)), CurrencyManager)
textboxLnSample.DataBindings.Add(New Binding("Text", dsSample.Tables(0),
"lastname"))
textboxFnSample.DataBindings.Add(New Binding("Text", dsSample.Tables(0),
"firstname"))
combobox1.DataSource = dsSample.Tables(0)
combobox1.EndUpdate()
///

I hope this helps a little bit?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top