Query between dates

Hello,

From Base (LO 7.1.1.2 w/ MySQL) I have a query that prompts the user to enter a starting date and an ending date. All records between are printed out. I would like to have the two dates entered on a form instead of the prompt that opens when the query is run.

So far, I have a filter table (called date) with a beginning date (beg) and an end date (end) which is linked to the form called “weekly_report”. Using the design mode for the query, I select the date field I wish to select my data from and in the criterion I enter <= ‘beg’ and I get denied (Base wants it in a date format).

How can I accomplish this? Txs

Hello,

There is a sample in my answer here → Is there a way to have a form field’s data in a base query for parameter (criteria)

The Base file does use a couple of small macros. One to resize the form and remove toolbars and another to run the report by pressing the button. The form has from and through dates for input and uses them in the query through the Filter table.

Worked like a charm! I was worried it would produce results between the two date and not including but it did include the dates.
Thanks Ratslinger!