Dropdown list in query parameter input

Creating tables and queries
Post Reply
MHCom
Posts: 16
Joined: Fri Nov 08, 2019 4:55 pm

Dropdown list in query parameter input

Post by MHCom »

Hi, apologies if this has been asked a lot already. I have a query with a parameter input (I've put :Name in the Criterion box that I want to filter results by) and a parameter input box comes up as expected when I run the query.

What I would really like to happen is that rather than just a blank free text box coming up, a dropdown list with all the unique values in the field comes up, so the user can select a valid entry to filter by. Is this possible?

Thanks
OpenOffice 4.1.5 on Windows 7 Professional
F3K Total
Volunteer
Posts: 1038
Joined: Fri Dec 16, 2011 8:20 pm

Re: Dropdown list in query parameter input

Post by F3K Total »

Yes,
it's possible to do in a form, using i.e. a one row filter table, see lot's of info here:viewtopic.php?f=100&t=42845
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
Kirjava
Posts: 30
Joined: Sun May 03, 2015 2:58 pm

Re: Dropdown list in query parameter input

Post by Kirjava »

That's nice, but how do I put a drop down box on a QUERY?
OpenOffice 3.1 on Windows 7
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Dropdown list in query parameter input

Post by Villeroy »

Forms are for user input.
Reports are for printable output.
Queries are not part of the user interface. They are more like development tools for data processing.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Kirjava
Posts: 30
Joined: Sun May 03, 2015 2:58 pm

Re: Dropdown list in query parameter input

Post by Kirjava »

How do I make the Value field in the "Parameter Input" box on a query be drop down instead?
OpenOffice 3.1 on Windows 7
Nick N,
Posts: 140
Joined: Wed Aug 09, 2023 2:10 pm

Re: Dropdown list in query parameter input

Post by Nick N, »

Hi,

Take a look at below example.

Regards

Nick
Attachments
example.jpg
example.jpg (20.13 KiB) Viewed 17415 times
Testify.odb
(12.22 KiB) Downloaded 120 times
Libre Office 6.0.7 on Ubuntu 18.04
Kirjava
Posts: 30
Joined: Sun May 03, 2015 2:58 pm

Re: Dropdown list in query parameter input

Post by Kirjava »

That is on the FORM, I am asking about the QUERY.
OpenOffice 3.1 on Windows 7
Nick N,
Posts: 140
Joined: Wed Aug 09, 2023 2:10 pm

Re: Dropdown list in query parameter input

Post by Nick N, »

All you have to do is to edit the form, then the list box and select control box as follows...
In any case make yourself more clear, OK?
Attachments
example2.jpg
example2.jpg (62.35 KiB) Viewed 17369 times
Libre Office 6.0.7 on Ubuntu 18.04
Kirjava
Posts: 30
Joined: Sun May 03, 2015 2:58 pm

Re: Dropdown list in query parameter input

Post by Kirjava »

HOW TO MAKE PARAMETER INPUT FOR QUERY A DROPDOWN BOX
OpenOffice 3.1 on Windows 7
Nick N,
Posts: 140
Joined: Wed Aug 09, 2023 2:10 pm

Re: Dropdown list in query parameter input

Post by Nick N, »

Dear Mr. Kirjava,

Capitals are in netiquette deprecated, await therefore your excuses.

Regards

Nick
Libre Office 6.0.7 on Ubuntu 18.04
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Dropdown list in query parameter input

Post by RoryOF »

It is worth noting that in OpenOffice /Tools /Macros /Organise Macros /OpenOffice Basic, under OpenOffice Macros : Tools there is a complete set of macros to handle Listboxes.

They may be under a similar position in Libreoffice (mutatis mutandis).
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Nick N,
Posts: 140
Joined: Wed Aug 09, 2023 2:10 pm

Re: Dropdown list in query parameter input

Post by Nick N, »

Halleluja Rory,

Have a nice Holiday!

Nick
Libre Office 6.0.7 on Ubuntu 18.04
Post Reply