I have have multiple fields based of different variables on a form that are used in a filter. 3 of these variables are set up as tree controls and use a table lookup to populate their data. When the user selects a value from one of the tree contols it filters a list or records shown in a browse on the form to that variables value.
I have a check button that when checked causes the users filter selections to "add on" to each other as they select different criteria. When uncheck, the selected value becomes the only value filtering the list.
I have a button that you can click to clear all filters and refresh the form. The problem I am having is that I cannot clear the variables.
I have tried to set the .value of the variables actual form field to "" and tried to set the variable value to "" and it always results in the tree fetching the first record of the look up and the variable taking on that value. This in turn results in the form filtering...I guess because the filter script in on the fields unchange event?.?.
If i do nothing to change the value of the variables (via xbasic on the show all records button), it does unfilter the list and show all records as I want. However, the last selected value in the trees remains highlighted and cannot be reselected without first selecting another value and then reselecting it.
I want to be able to clear the filter, reset the trees so no value is highlighted/selected, and the variables are all stripped of their values.
Not sure how to do this so I have stripped down and attached the db and the form.
I am sure this is another easy fix!
Thanks
Tony
I have a check button that when checked causes the users filter selections to "add on" to each other as they select different criteria. When uncheck, the selected value becomes the only value filtering the list.
I have a button that you can click to clear all filters and refresh the form. The problem I am having is that I cannot clear the variables.
I have tried to set the .value of the variables actual form field to "" and tried to set the variable value to "" and it always results in the tree fetching the first record of the look up and the variable taking on that value. This in turn results in the form filtering...I guess because the filter script in on the fields unchange event?.?.
If i do nothing to change the value of the variables (via xbasic on the show all records button), it does unfilter the list and show all records as I want. However, the last selected value in the trees remains highlighted and cannot be reselected without first selecting another value and then reselecting it.
I want to be able to clear the filter, reset the trees so no value is highlighted/selected, and the variables are all stripped of their values.
Not sure how to do this so I have stripped down and attached the db and the form.
I am sure this is another easy fix!
Thanks
Tony
Comment