Hi everyone,
I inserted a numerical field in a form to show the total for a given invoice, but the field does not follow the form, I have to click inside it and then navigate the invoices (F_Facture, SommeFacture). I tried to copy the methods and SQL instructions but i'm obiously missing something.
On a very related note, sometimes I want to just show info in a dropdown ListBox, but the input gets repeated to the table with a new ID. What am I doing wrong?
I feel totally incompetent, and I'm usually a pretty smart guy.
Finally, I don't think I thanked eremmel for the last time he helped me, so a big thank you to him!
Cheers
[Solved] Numerical field-Subform link
Re: Numerical field-Subform link
Data properties of listbox:
Data Field = empty
Bound Field = empty
Data Field = empty
Bound Field = empty
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
-
- Volunteer
- Posts: 1548
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: Numerical field-Subform link
To get your total calculation on the form document F_Facture to follow the invoice you need to move the subform “Formulaire 1” to be a subform of ”SousFormDétail”.
The query supplying data to “Formulaire 1” should be changed to
And finally set both the Link Master fields and Link Slave fields properties to “ID_Facture”
The query supplying data to “Formulaire 1” should be changed to
Code: Select all
SELECT SUM( "TFD"."Qte" * "TB"."Prix" ) AS "SommeFacture", "TFD"."ID_Facture" FROM "T_FactureDetail" AS "TFD", "T_Facture" AS "TF", "T_Bijou" AS "TB" WHERE "TFD"."ID_Facture" = "TF"."ID" AND "TB"."ID" = "TFD"."ID_Bijou" GROUP BY "TFD"."ID_Facture";
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: Numerical field-Subform link
All right, now I understand how it works. If I want to show an aggregate of a table, or any content of a form, I need to insert a SubForm within that form and reference it in my ListBox (or TextBox, Currency, etc.)
Thank you very much. Every new thing is a small victory.
Thank you very much. Every new thing is a small victory.
OpenOffice 4.1.3 on Windows 7