[base] user input based on dropdown

Good morning,

I have a table “Operations” with :

  • ID (integer)
  • Operation (text)
  • Date (date)

I create a basic query with user input :
SELECT * FROM “Operations” WHERE “Date” = :EnterDate

The user enters the exact date and gets the respective operations of the day.

Instead of the users typing for the date, I would like the input to be a dropdown based on the dates in the “Operations” table : When the query is called, the user selects the date from the dropdown.

Is it possible ? If not possible with a query, can I do it at the report level ?

The final purpose is this one : the user will extract a report of the different operations for a selected date and will print it.

I hope it is clear. Thank you for your help.

Hobbit

  • OS : Ubuntu 18.04
  • LO : 6.2.3.2
  • DB : HSQLDB

Hello,

Yes, it is possible. Probably not in the manner you depicted.

To use a “dropdown” means a list or combo box. This requires using a Form.

You can use a table filter (many samples found here with a search) in conjunction with the query for the report. The list box would set the value in the filter table which is then used by the query. The report can then be run.

If used, and since currently selecting on a form, the report can be started from the form with a button tied to a macro. For a sample of this, see this post → How to use a form button to open a report.

Edit:

Have attached a simple example ---- DateFilter.odb