Dropdown list in query parameter input

Creating tables and queries
Locked
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: 1046
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 11 AOO, LO | Linux Mint AOO, LO
Kirjava
Posts: 33
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: 31349
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: 33
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
User avatar
Nick N,
Banned
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 27569 times
Testify.odb
(12.22 KiB) Downloaded 456 times
Libre Office 6.0.7 on Ubuntu 18.04
Kirjava
Posts: 33
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
User avatar
Nick N,
Banned
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 27523 times
Libre Office 6.0.7 on Ubuntu 18.04
Kirjava
Posts: 33
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
User avatar
Nick N,
Banned
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: 35103
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.5 LTS
User avatar
Nick N,
Banned
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
Kirjava
Posts: 33
Joined: Sun May 03, 2015 2:58 pm

Re: Dropdown list in query parameter input

Post by Kirjava »

How do I delete this? It did not help.
OpenOffice 3.1 on Windows 7
User avatar
MrProgrammer
Moderator
Posts: 5348
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Dropdown list in query parameter input

Post by MrProgrammer »

Kirjava wrote: Sat Jul 27, 2024 1:35 pm How do I delete this? It did not help.
Delete what, Kirjava? The topic? You can't delete it. The topic is from 2019 and it belongs to MHCom. You began asking questions in their topic several months ago. If that discussion does not help you, just ignore it. Even if the discussion didn't help you, it might be useful to someone else.

You are welcome to open your own topic if you need more assistance with your query. You are more likely to get your problem solved quickly if you attach a sample database document (ODB file) to demonstrate the situation (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the document itself).
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.6, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Locked