Hello
I want to know if there is some easy way to build query form with dynamic query condition. I have some workaround for this, but I hope anyone has better solution 
Let say that we have table in database (customers) with columns
On form we will have:
- textbox with name (we want to query by name using like)
- dropdown with list of countries
- dropdown with list of towns dependant on
- dropdown with list (yes, no, both) if thic customer is prefered
- grid and search button
On load, there should be no result on grid.
If user enter part of name, this should be added to WHERE condition.
If user select country, it should be added to WHERE condition
If user select both from prefered, there should be no WHERE condition with it
It would be great if query condition could refresh only on search button - not when first drop down will change (becouse it has dependants of it's own).
I was trying with dynamic query in stored procedure, it works, but It's not perfect 
Greg