DropDown Search
-
Hi, I have 3 tables: table1, table2 and table3. Table 1 (table1ID, Name1) Table 2 (table2ID, table1ID, Name2) Table 3 (table3ID, table2ID, Name3) I have 2 DropDownLists: ddltable1SEARCH and ddltable2SEARCH. They are both databound with the fields table1.Name1 and table2.Name2 respectively. I also have a Datagrid: table3grid. It is databound with the field table3.Name3. NOTE: Please keep in mind the table relationships. My point is: I CANNOT directly perform a search using the first dropdown. DropDown2 relies on DropDown1. When DropDown1 changes, DropDown2 changes to display available entries. THEN, the search is directly done by using DropDown2 for the Datagrid. I have already created the view for the tables. Therefore, I would like to know which of the following VB statements is syntatically correct when I am passing the search values from the DropDowns to a SubRoutine:
obj.SearchSubRoutine(Me.ddltable2SEARCH.SelectedValue)
ORobj.SearchSubRoutine(Me.ddltable1SEARCH.SelectedValue **And** Me.ddltable2SEARCH.SelectedValue)
-
Hi, I have 3 tables: table1, table2 and table3. Table 1 (table1ID, Name1) Table 2 (table2ID, table1ID, Name2) Table 3 (table3ID, table2ID, Name3) I have 2 DropDownLists: ddltable1SEARCH and ddltable2SEARCH. They are both databound with the fields table1.Name1 and table2.Name2 respectively. I also have a Datagrid: table3grid. It is databound with the field table3.Name3. NOTE: Please keep in mind the table relationships. My point is: I CANNOT directly perform a search using the first dropdown. DropDown2 relies on DropDown1. When DropDown1 changes, DropDown2 changes to display available entries. THEN, the search is directly done by using DropDown2 for the Datagrid. I have already created the view for the tables. Therefore, I would like to know which of the following VB statements is syntatically correct when I am passing the search values from the DropDowns to a SubRoutine:
obj.SearchSubRoutine(Me.ddltable2SEARCH.SelectedValue)
ORobj.SearchSubRoutine(Me.ddltable1SEARCH.SelectedValue **And** Me.ddltable2SEARCH.SelectedValue)
As per the Table Relationships, Table3 refers only Table2 and Table2 refers Table1. And you are refreshing the ddltable2SEARCH list whenever ddltable1SEARCH selection changes. So, you don't need to consider both dropdown values to fill the datagrid. I would prefer : obj.SearchSubRoutine(Me.ddltable2SEARCH.SelectedValue)
Ravi Gopal.
-
As per the Table Relationships, Table3 refers only Table2 and Table2 refers Table1. And you are refreshing the ddltable2SEARCH list whenever ddltable1SEARCH selection changes. So, you don't need to consider both dropdown values to fill the datagrid. I would prefer : obj.SearchSubRoutine(Me.ddltable2SEARCH.SelectedValue)
Ravi Gopal.