HI..I have the following table
YearsOnline..it has three columns
CompanyId Year
------------- -----
1 2000
1 2001
2 2000

I have two combo boxes..cboCompany and cboYears
In the LOAD event of the form I do the following :
I fill two tables in a dataset..tblCompanies and tblYearsOnline
and i populate the cboCompanies as follows:

Code:
cboCompanies.DataSource = Ds.Tables("tblCompanies")
cboCompanies.DisplayMember = "CompanyName"
cboCompanies.ValueMember = "CompanyId"



SO I need to POPULATE THE SECOND Combo Box with the years RELATED to the
company in the FIRST combo box...
So I tried to put the following code in the cboCompanies.SelectedIndexChanged
event handler


Code:
Ds.Tables("tblYearsOnline").DefualtView.RowFilter = IIF(cboCompanies.Text.Length
= 0,0,cboCompanies.SelectedValue
cboYears.DataSource = Ds.Tables("tblYearsOnline").DefaultView
cboYears.DisplayMember = "YearsOnLine"
cboYears.ValueMember = "YearsOnLine"



THIS IS NOT WORKING..WHAT SHOULD I DO??..PLEASE HELP ME??..I am really frustrated!!!