There's currently no way I know of of directly passing the value one can input in, for instance, a calendar date picker in a form, to a query. Suppose I have a series of events, each one having a Date field. Now I want to query for all events happened between 2016-01-01 and 2016-12-31. I can write a query with :parameters so, when I run it, a dialog window appears to ask me to write the values I want to use as parameters. But I want the user to supply the start date and end date in a calendar picker, like the one you can have in Forms, where you select Dropdown Yes and get a calendar-like interface. So I don't want to use :parameters anymore, because doing so would bring up the window asking to enter dates in a text field. What I want to do is to write a query where I say to select all the events where the Date is between the two values I specify in the form calendar field. But currently I see no way of directly referencing the value of a form input box in a SQL query (the fact that you can't do it in the GUI is probably another separate enhancement request). From what I've read, MS Access should have a similar feature which syntax is [Forms]![Form1].[field] I'm proposing to add this, or a similar syntax, in Base. There should be another solution, from what I've read, involving a filter table and so, but I find this method to be simpler from a user perspective. This way, ideally, I select all the events happened between [Forms]![Form1].[startdate] and [Forms]![Form1].[enddate] in my query, then create a form based on this query, and finally simply add 2 calendar dropdowns called startdate and enddate. When I open the form, I fill in the dates and somehow update the underlying query.
At this moment you could 1. Create a table "filter" only for one row with ID - BOOLEAN, primarykey date_start - DATE date_end - DATE 2. Put in the first value for ID: TRUE 3. Create a form for this table with date_start date_end (there you could choose the dropdown you wish) 4. Set this form by the filter to show only the values for ID = TRUE 5. Set the cycle of the form "only this row" (don't know how it is called in English GUI) 6. Add the query to a form beneath this one - mustn't be a subform. 7. Add a button to this form, which should refresh the query. That's the way to get what you want. You might get the same result with macros - but this one works without and you could also get the content of the last input when only opening the query, because the values of your table would be read out of "filter" ( ... WHERE "start_date" = IFNULL(SELECT "date_start" FROM "filter" WHERE "ID" = TRUE), "start_date") AND "end_date" = ...)
@edonkey2001 : forms and queries are separate objects in the MVC paradigm of LibreOffice - queries via the GUI have only a limited number of interactions and a date control is not one of them, however that is not what you are requesting here if I've undersood correctly. What you want if I've understood correctly is for the values of date controls in a form, to be passed to a query, although you don't specify where that query might be - currently that is only possible by the workaround suggested by Robert, or else via macro using the UNO API. I shall confirm your RFE but I have no idea whether in the current scheme of things what you are asking for is remotely possible or even desirable. For that, a developer would be required to give their input.