I want to enter a parameters (ex. date range, Dep. name...), then to click on a command "Execute Query" (All of them are available on form header) to run the query and show the query result in a form detail.
It's not very clear from the wording of your question but I suspect you're asking about Cascaded Form Filtering. You may need to re-appraise your understanding of what you're doing but this will do what you need for you.