Which is the event that update a SQL where condition ?

Dear all,

I’ve a select field and I would like that updating it (ON CHANGE) the SQL query would be run once again with the newest selected parameter.

I’ve a SQL WHERE condition like that : Field of table = global variable
year_card_actual = ‘[year_of_reference]’

I don’t know if there is an event or if I can give a command within the ON CHANGE code in order to have my record filtered correctly.
Now when I update the select field nothing happens.

Thanks
Giovannino

If you i.e. have created a button to update the query then you can use the onload event.

No I didn’t. Is there no possibility to use ONCHANGE and update the visualized data ?
It’s not clear to me how to update the SC SQL of form (left panel) or I have to write a new SQL code within ONCHANGE.
How can I update in the second option the displayed value of details form ?
Thanks