Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DDDW

Status
Not open for further replies.

magni

Programmer
Oct 11, 2007
12
CA
I have total 5 dropdown fields, they are d1, d2, d3, d4, d5. I need to filter dropdown datawindow based on the content of the selection from the fields.. I want to create a filter.
Each fields contain 5 items. that is
d1 - A, B, C, D, E
d2 - AA, BB, CC, DD, EE
d3 - AAA, BBB, CCC, DDD, EEE
d4 - AAAA, BBBB, CCCC, DDDD, EEEE
d5 - AAAAA, BBBBB, CCCCC, DDDDD, EEEEE
If the user select A from d1 then d2 should display AA and so on. Any idea???
 
Hi,
If I understand correctly, you have one datawindow with 5 column as DropDown Datawindows. If this is the case, in the itemchanged of the main datawindow, you will have something like:

Datawindowchild ldwc

If dwo.name = "<name of d1's column>" then
getchild( <name of d2's column>, ldwc)
ldwc.setfilter(" <d2's sortcolumn which holds d1 values> = " + data)
ldwc.filter()
End if

...

and you continue for each of your dropdowns. Keep in mind that a child datawindow does not have filter buffer so the data filtered out is lost and should be re-retrieve should you need it again.

David.

:)
David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top