Pierotos
New member
- Joined
- Mar 2, 2011
- Messages
- 1
- Programming Experience
- 1-3
Hello,
I am a newbie to VB and i am using Visual Studio 2008. I am trying to fill 3 comboboxes with database (SQL Server 2000) data.
My data (Consumables table):
ID STORE YEAR MONTH CODE DESCRIPTION QUANTITY
1- 25- 2010- 12- 11111- TONER A- 2
1- 25- 2011- 2- 11111- TONER A- 5
2- 25- 2011- 2- 11112- TONER B- 3
1- 25- 2011- 3- 11111- TONER A- 1
1- 30- 2011- 2- 11111- TONER A- 3
1- 40- 2011- 3- 11111- TONER A- 8
2- 40- 2011- 3- 11112- TONER B- 9
Key columns: ID - STORE - YEAR - MONTH
What i want is:
The 1st combobox (Store) to show only stores 25-30-40 (Unique values)
When i select store i want the 2nd combobox (Year) to show only the years that exist order for the selected store.
The 3rd combobox (Month) must show only Months that matches with the selected store and year.
1st Example
Store: Show 25-30-40 ... Choose 25
Year: Show 2010-2011 ... Choose 2011
Month: Show 2-3 ... Choose 3
2nd Example
Store: Show 25-30-40 ... Choose 25
Year: Show 2010-2011 ... Choose 2010
Month: Show 12 ... Choose 12
At the end, i will fill a datagridview with the specific data from the above criteria by pressing a sumbit button.
I am very confused with bindingsource - tableadapter - dataset.
Can anyone help me???
Thanks in advance
P.S. Sorry for my bad english
I am a newbie to VB and i am using Visual Studio 2008. I am trying to fill 3 comboboxes with database (SQL Server 2000) data.
My data (Consumables table):
ID STORE YEAR MONTH CODE DESCRIPTION QUANTITY
1- 25- 2010- 12- 11111- TONER A- 2
1- 25- 2011- 2- 11111- TONER A- 5
2- 25- 2011- 2- 11112- TONER B- 3
1- 25- 2011- 3- 11111- TONER A- 1
1- 30- 2011- 2- 11111- TONER A- 3
1- 40- 2011- 3- 11111- TONER A- 8
2- 40- 2011- 3- 11112- TONER B- 9
Key columns: ID - STORE - YEAR - MONTH
What i want is:
The 1st combobox (Store) to show only stores 25-30-40 (Unique values)
When i select store i want the 2nd combobox (Year) to show only the years that exist order for the selected store.
The 3rd combobox (Month) must show only Months that matches with the selected store and year.
1st Example
Store: Show 25-30-40 ... Choose 25
Year: Show 2010-2011 ... Choose 2011
Month: Show 2-3 ... Choose 3
2nd Example
Store: Show 25-30-40 ... Choose 25
Year: Show 2010-2011 ... Choose 2010
Month: Show 12 ... Choose 12
At the end, i will fill a datagridview with the specific data from the above criteria by pressing a sumbit button.
I am very confused with bindingsource - tableadapter - dataset.
Can anyone help me???
Thanks in advance
P.S. Sorry for my bad english