Ask Your Question
0

[base] user input based on dropdown

asked 2019-05-01 11:06:21 +0200

hobbit32 gravatar image

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
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-05-01 18:55:19 +0200

Ratslinger gravatar image

updated 2019-05-02 02:08:51 +0200

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

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-05-01 11:06:21 +0200

Seen: 36 times

Last updated: May 02