Page 1 of 1

Cross table entry form

PostPosted: Wed May 05, 2021 1:08 pm
by BSP
Dear all,

learning "French" (and "Base") I'm trying to compose a "Glossary database".

Reading a novel,.. I want to enter sentences into this Glossary (by novel) and subsequently elucidate the different words that I'm struggling with.

I have set up the following tables:
* Novels;
* Novels2Words;
* Words

The Novels2Words table is the cross table, containing also the specific sentence.

I would like to build a data entry form for this:
1 idealistically,.. I would like to first of all to indicate which novel I'm reading (may be through a push button ?);
2 Then I would like to enter sentences;
3 Then (per sentence) I wouyld like to enter the words that I'm struggling with.

As long as I'm reading this novel, I shouldn't bother entering this novel again and again for every sentence I'm going to enter.

I succeeded to set up a form, where:
1) first of all, I enter a word that I'm struggling with;
2) The wordt id is then transferred to the crosstable, allowing me also to enter the sentence there;
3) Finally, I'll enter the novel that I'm reading though a listbox, including a sql query referring to the novel table.


The way I look at it, it should be as follows:
1) first indicate which novel I'm reading;
2) enter the sentence that I'm struggling with;
3) enter as many struggle-words as needed, which are derived from thet sentence. Maybe through a "Grid-form coontrol" ??

Repeat 2 and 3 as long as I'm reading this novel.

In the end,.. I would like this glossary to be a cross novel glossary: so if I look up a word that I have stuggled with, I would like to find all sentences from different novels, where this word was used.
So,.. no Chinese walls between novel.

Attached please find my simple datebase.

Kind regards & please pardon my French ;-)

Berthold Spaans

Re: Cross table entry form

PostPosted: Wed May 05, 2021 2:15 pm
by Villeroy
This is a many-to-many relation (m:n relation) where many noms belong to many livres and vice versa.
In the example database attached to viewtopic.php?f=100&t=40444 many things belong to many persons and vice versa.

The recipe for a many-to-many form is always the same:
One list in the main form (TableA)
The cross table in a subform's table control showing every TableB.ID for the selected TableA.ID.
Replace the TableB.ID column with a listbox showing the name behind the TableB.ID (column right-click>Replace with > Listbox).
The recipe for a listbox is always the same: SELECT "visible text", "ID" FROM "somewhere" ORDER By "visible text"
This way you select an A.ID in the main form and add many B.IDs into the subform's table grid by picking them from a column of listboxes.

I created a Base document connected to your HSQLDB, copied your example data from Noms to Noms2 and from Livres to Livres2.
Then I added a form showing the Noms of each Livre and another form showing the Livres of each Nom.
Adjust the database path in menu:Edit>Connection...

Re: Cross table entry form

PostPosted: Wed May 05, 2021 5:14 pm
by BSP
Hi Villeroy,.,.

Thank you for your swift response,.. however,.. what I'm missing,.. is
* the option to enter "a sentence" in the form, specifically in the cross table;
* the option to "physically"enter "struggling-wordt", that I encounter in every specific sentence.

Your form, suggestst that I know the words that I am struggling with in advance or even stronger,.. their ID's.
This is not the case. I'm reading them on the fly from the sentences that I'm struggling with.

* I would suggest to enter sentences through a text box;
* Then struggling words through a table, not by ID, but as words that I read from the sentence just entered.

Explanation "workflow of reading a novel":
1) I'm reading a novel (in French language);
2) I'm struggling with some sentences: I 'll enter the sentences (one at a time) in the intermediate table;
3) From the SPECIFIC sentence (in my DB "Exemple") I''ll pick the words to elucidate (in table "Nom2").

Since the reading of a novel takes some time, would be nice,.. to work in the specified "Novel-Area" as long as I haven't finished reading the novel.

So,.. therefore, I suggested to first arrange a choice for a specific Novel from the Novel table by way of a push button.

From there work with cross table and enter "Sentences" and "struggle words" in cycles (within the "Novel area") until novel is finished.

Do you think this is possible ?

Thank you in advance,..


Re: Cross table entry form

PostPosted: Wed May 05, 2021 7:30 pm
by Villeroy
No, I don't think it's possible.