Adding additional subforms to a form

Creating and using forms
Post Reply
djos
Posts: 2
Joined: Wed Aug 14, 2013 1:32 am

Adding additional subforms to a form

Post by djos »

I need help with openoffice base. i created a form with a subform using the wizard. i need more than one subform and dont know how to add additional subforms. i tried researching on the web but nothing helps. can you help me insert more subforms into a form. thanks
OpenOffice 3.1 on Windows
User avatar
Hagar Delest
Moderator
Posts: 32627
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Adding additional subforms to a form

Post by Hagar Delest »

I've moved your topic in the Forms section of the forum, you should browse that section, I think there are similar topics about that.

Please add '[Solved]' at the beginning of your first post title (edit button) if your issue has been fixed.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
DACM
Volunteer
Posts: 1138
Joined: Tue Nov 03, 2009 7:24 am

Re: Adding additional subforms to a form

Post by DACM »

You’ll need to enable the ‘Form Design’ toolbar in order to access the ‘Form Navigator’ (5th button on the Form Design toolbar). With the Navigator you’ll be able to manage MainForms and SubForms.


Image
AOO 4.1.x; LO 4.2.x; Windows 7/8 64-bit
Warning: Avoid embedded databases --> Solution: Adopt a portable 'split database' folder
Soli Deo gloria
dar_jab
Posts: 4
Joined: Fri Jan 08, 2016 4:26 pm

Re: Adding additional subforms to a form

Post by dar_jab »

Hello.
DACM whether you can sample file of the example described above?
LibreOffice Wersja: 5.0.3.2
dpark29
Posts: 14
Joined: Thu Mar 27, 2014 1:39 pm

Re: Adding additional subforms to a form

Post by dpark29 »

If you are new to OpenOffice (as I am) don't think about forms and sub forms like a MS Access developer where you develop separate main and sub forms and then copy/paste the sub form on the main form and then use form properties to create the parent-child (or in OpenOffice terms master-slave) relationship for the sub form. In OpenOffice one uses the Form Navigator to add sub forms to a form.

As mentioned in earlier posts, you add sub forms by selecting the main form (the one at the top of the list) in the Form Navigator. Then right-click and then select New>Form. This action appends a sub form to the main form. In the properties window of the new form on the [General] tab change the default name from “Form” to something more descriptive, on the [Data] tab link the sub form to the table that will contain fields for the sub form, and use the ellipsis control [...] to the right of the “Link master fields” or “Link Slave Fields” to open the Link Fields control that is used create the one-to-many link between the table bound to the master table and sub form table.

Be sure the sub form control is high-lighted in the Form Navigator and then add the fields to the sub form (unlike MS Access you create the sub form right on the main form)
Summary:
1. In Form Navigator click on the top form
2. Right-click, New>Form
3. Open the Properties window of the new sub form
4. Change the name of the sub form on the [General] tab (optional)
5. On the [Data] tab; identify the table to bind to the sub form
6. Use the Link master field ellipsis control to open the Link Fields control and then identify the master-slave fields for the sub form.
7. Add fields to the sub form (to verify that the controls you are adding are from the “child” table, use the Add Field utility at the bottom of the edit screen to see the table and fields linked to the sub form.

You can use this technique to add one or more sub forms to the main form.
OpenOffice 4.01, Windows 7
Happy2018
Posts: 4
Joined: Mon Feb 12, 2018 7:21 pm

Re: Adding additional subforms to a form

Post by Happy2018 »

DACM wrote:You’ll need to enable the ‘Form Design’ toolbar in order to access the ‘Form Navigator’ (5th button on the Form Design toolbar). With the Navigator you’ll be able to manage MainForms and SubForms.


Image


Hi,

I know this is an old topic, but it best suits exactly what I want to do.

The only problem I have having is HOW do you turn on the Form Navigator, I see it, but it is greyed out.


Thankyou

Also hope it was ok, to post here, this is my first post in this forum.
OpenOffice 4.1.5 Mac
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Adding additional subforms to a form

Post by UnklDonald418 »

Welcome to the forum.
If the Form Navigator icon is “greyed out” you are not in the Design mode.
Close the form document, then right click on the form name and select Edit.
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
Happy2018
Posts: 4
Joined: Mon Feb 12, 2018 7:21 pm

Re: Adding additional subforms to a form

Post by Happy2018 »

PERFECT! You are a godsend!

Thank you!
OpenOffice 4.1.5 Mac
Happy2018
Posts: 4
Joined: Mon Feb 12, 2018 7:21 pm

Re: Adding additional subforms to a form

Post by Happy2018 »

Hi,

If I could trouble you a bit further, as the screen I see is different then the one above in the post, I don't have the options to:


t should have said, I don't have the options to:

Link Master Fields or to
Link Slaves Fields




This is what I see: attachment
Attachments
11.jpg
11.jpg (18.26 KiB) Viewed 9255 times
Last edited by Happy2018 on Mon Feb 12, 2018 11:30 pm, edited 1 time in total.
OpenOffice 4.1.5 Mac
Happy2018
Posts: 4
Joined: Mon Feb 12, 2018 7:21 pm

Re: Adding additional subforms to a form

Post by Happy2018 »

My apologies for the 2nd post, I ouldn't find the edit button above.
Last edited by Happy2018 on Mon Feb 12, 2018 11:31 pm, edited 1 time in total.
OpenOffice 4.1.5 Mac
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Adding additional subforms to a form

Post by Villeroy »

This is not a subform. It is a main form. And it has no record set (no table, query, SQL statement).
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
LilZebra
Posts: 43
Joined: Sun Mar 06, 2016 4:27 pm
Location: Canada

Re: Adding additional subforms to a form

Post by LilZebra »

I'm so happy now.
I have a Base file for an Apartment Search and I wanted to display the calculated field 'Damage Dep.' (50% of Rent) on the Form.

Now I know how...
The Master and Slave fields... in my case Rent in the 'Apartment Search' and Rent in the Query had to be matched up.

Now they work beautifully.

I feel so empowered with this knowledge now I could probably design a Payroll database in LO.

Image

Image
LibreOffice 6.1.3.2 (Linux Fedora 29 on x86_64) with 'Notebookbar'
OpenOffice.org since 2002-12. LibreOffice user since 2013-current.
HSQLDB 2.5.0
Post Reply