Hi, I'm trying to build my first vb2005 dataapp but I'm somewhat lost here. I
have a database table displayed in a grid. This table has a field called
countryid which is linked to another table with the actual countrynames. On
the same form I have a combobox which should be linked to both tables in
order to display the names. In VB6 this was done easily through .datafield,
.boundcolumn and listfield. How should I do this in vb2005?
Thanks,
Frank
It is much the same in 2005.
You need 2 BindingSource:
-BindingSource1 = The table that contains your linked field
-BindingSource2 = YourCountryNamesTable
You then need to set 4 properties of the ComboBox:
-DataSource (BindingSource2)
-DisplayMember (The ID field from BindingSource2)
-ValueMember (The field you want to display from BindingSource2)
-SelectedValue (The ID field from BindingSource1)

Signature
HTH
Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Concept S2i inc. (www.s2i.com)
http://emoreau.s2i.com/
> Hi, I'm trying to build my first vb2005 dataapp but I'm somewhat lost
> here. I
[quoted text clipped - 8 lines]
> Thanks,
> Frank