if I understand well:
1)does your ddlb contain values that correspond to certain fields of a table?
2)the search should limit the selected value of the ddlb with the value entered in the sle?
If so .... then
you can do various stuff:
------------------------
easiest:
-use the setfilter() and filter() functions after having retrieved the data in the datawindow (dw_1.retrieve() )
another:
-or: change/compose the where clause of the datawindow dynamically. You can use the Modify() function of datawindows or you could also put some code in the sqlpreview event, to modify/add your conditions to the select statement that enteres there as an argument, just before being send to the database to obtain the values.
-you can define a retrieval argument for each posible value in the ddlb to the datawindow:
if for example the ddlb has 3 fields: field1, field2, field3
and the user chooses for example field2 in the ddlb your retrieve statement could look like this.
dw_1.retrieve(-1, long(sle_1.text), -1)
the sqlstatement (datasource) of your datawindow could have something like:
select * from mytable
where ( field1 = :arg1 or :arg1 = -1) and
(field2 = :arg2 or :arg2 = -1) and
(field3 = :arg3 or :arg3 = -1)
what you'd achieve by this is that field1, ..2, and ..3 are only limiting when the argument value passed to the retrieve() is diferent then -1.
if the fieldtypes are diferent for example string.. I use to pass '[todos]' instead of a -1 value.
I don't know if you get the idea.
regards,
Miguel L.