Store this query in your Base file:
Code: Select all
SELECT * FROM "MyTable" WHERE "DateColumn" BETWEEN :D1 AND :D2
Open your Calc document.
menu:View>Data Sources (F4)
Navigate to your database and the query
Drag the query icon into the sheet.
You will be prompted for 2 dates.
Save the spreadhsheet
-------------------------
Every time you select a cell in the import range and call menu:Data>Refresh you will be prompted for 2 dates and get the current data set imported in your sheet.
A slightly more advanced example on how to link a spreadhsheet and database:
viewtopic.php?t=88516&p=416210#p416210
It includes one line of macro code to refresh the report sheet when you click a form button.