[Solved] Selecting record from a table with key field value
[Solved] Selecting record from a table with key field value
Years ago I built a system with Access and MySQL, in which a user would enter all or part of a surname to get the main client record displayed. A combo box was used to display a popup for entry of the search argument. A query then displayed all the possible matches for the user to select. Where can I find instructions to tell me how to do this in Base, with Open Office 4.1.2 and Windows 10?
Last edited by murraymr on Sat Aug 13, 2016 7:57 pm, edited 1 time in total.
Open Office 4.1.2 on Windows 10
-
- Volunteer
- Posts: 1549
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: Selecting a record from a table with key field value
Here are links to a couple of videos covering the basics of creating Combo Boxes on OOBase forms
http://showmedo.com/videotutorials/vide ... esID%3D112
https://www.youtube.com/watch?v=aOkkqaHRgzY
or a non-video tutorial at
http://sheepdogguides.com/fdb/fdb1listb.htm
For more advanced uses there is a tutorial at
viewtopic.php?f=100&t=42845
http://showmedo.com/videotutorials/vide ... esID%3D112
https://www.youtube.com/watch?v=aOkkqaHRgzY
or a non-video tutorial at
http://sheepdogguides.com/fdb/fdb1listb.htm
For more advanced uses there is a tutorial at
viewtopic.php?f=100&t=42845
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Re: Selecting a record from a table with key field value
Thank you for your response to my cry for help! I had found the first video, but what I realised I needed was help in setting up a combo box with all the code I had used in MS Access. I have found the LibreOffice Base handbook, which has shown me how to use the Standard Filter to find a single record in a table, using a value for one or more fields. A very simple and elegant solution!
Open Office 4.1.2 on Windows 10
Re: Selecting a record from a table with key field valu (Sol
download/file.php?id=21951
Open the "ID Filter" form. Pick an ID number from the list box and hit OK. The unique ID identifies one particular record from the "Data" table.
The subform shows the selected record. Now you can print the form or you can print the report named "Report3" which refers to the same ID value which is stored in row #5 of table "Filter".
The content of the list box is
First ID field is the visible field, second one is the content that gets written into the criteria table.
If the "Data" table where a list of persons, you could use a concatenation like this:
which would show entries like
while writing the respective ID value into the criteria table.
btw: a combo box is nothing but a simple text box with auto-complete.
Open the "ID Filter" form. Pick an ID number from the list box and hit OK. The unique ID identifies one particular record from the "Data" table.
The subform shows the selected record. Now you can print the form or you can print the report named "Report3" which refers to the same ID value which is stored in row #5 of table "Filter".
The content of the list box is
Code: Select all
SELECT "ID", "ID" FROM "Data"
If the "Data" table where a list of persons, you could use a concatenation like this:
Code: Select all
SELECT "Surname" || ', ' "Forename" || ' - '|| "Birthday" AS "Visible", "ID" FROM "Data"
Code: Select all
Doe, John - 1943-12-31
btw: a combo box is nothing but a simple text box with auto-complete.
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
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice