List Box and Combo Box

Discuss the database features
Post Reply
arpeggio16
Posts: 4
Joined: Mon Jun 26, 2017 5:57 pm

List Box and Combo Box

Post by arpeggio16 »

I'm attempting to create a database of my sheet music collection that will have many repetitious entries so I am sure that a list box (at least) will be needed. Possibly also a combo box. For instance I want to indicate what key signature a piece is in, the tempo, musical style, composers. So I don't want to type those in each time. I cannot seem to "get to" or change the field to a list box, in spite of following the instructions. Can someone please help. Also, how can I input "fractions" when there are times I really don't want a decimal. If something is 1 7/8 I don't want to have to translate that back in mind to 1 7/8 from whatever the equivalent is as a decimal number. I've tried the "How To's", Tutorials, Survival Guide etc, etc. Still need help.
Thanks
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: List Box and Combo Box

Post by Villeroy »

viewtopic.php?f=100&t=40444

Form controls of the type "formatted field" behave similar to spreadsheet cells. They support fractions to some extent.
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
arpeggio16
Posts: 4
Joined: Mon Jun 26, 2017 5:57 pm

Re: List Box and Combo Box

Post by arpeggio16 »

Unfortunately that didn't answer my question, nor help my need. Let's ignore the fractions part of my question. I would just be happy if there were simple, basic instructions for how to set up a table to have the field entries as list or combo boxes. I have had a stand alone product that no longer works, and is no longer supported--toooo old. So I decided it would be better to build my own than to lose my data again. This is what I need:
Composer: I would like to enter just once, all the composers in my music collection and have them in a drop down/list or combo box so that when I am entering a piece of music I can just select the composer. Saves trying to remember how I entered it the last 10 times, which is a problem if I'm trying to pull up all my music by the same composer.
Key: Again, I would like to enter all the keys, C, D, Db, G, A, Ab, etc. just once so that, again, I can select the key the particular piece is in.
Collection: Y, N. If the piece of music is in a collection rather than a single piece of music
Season/Use: Christmas, Wedding, Easter, etc. Again, enter it just once, and be able to select which is the appropriate one.
Instrumentation: Organ, Piano, Organ-Piano Duet, etc.
Playing time: 1 minute, 2 minutes, 3 minutes, etc
These are an example of the fields that would be repetitious.
The other fields would be unique, title of the piece, tune, date last used, Notes
That's what I'm trying to set up. I can create the table, and create the form. But I don't know how to create a form that allows me to complete some of the fields from a list (i.e. composer, season, instrument, etc)
alicia
Openoffice 4.1.3 on Windows 8.1
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: List Box and Combo Box

Post by Villeroy »

Well, in the linked example database, you enter all persons, things and animals only once and then assign many things and one animal to a person by means of list boxes.
The database consists of interrelated, normalised tables: https://support.microsoft.com/en-us/kb/283878
This is how all relational databases use to work since 4 decades. This is the expected setup to build up working input forms.
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
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: List Box and Combo Box

Post by Villeroy »

For a simple one-table setup with repeating text values, you can bind combo boxes to the table fields.
The general list content of a combo box is:

Code: Select all

SELECT DISTINCT "Names" FROM "Table" ORDER BY "Names" ASC
The combo box suggests the distinct names but you could enter any other text as well.
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
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: List Box and Combo Box

Post by Villeroy »

Added Combo vs List Box to the Base tutorials.
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
Post Reply