Combo Box Problem
HI..I have the following table
YearsOnline..it has three columns
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:
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
Ds.Tables("tblYearsOnline").DefualtView.RowFilter = IIF(cboCompanies.Text.Length
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!!!
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL