Page 1 of 1

Adding additional subforms to a form

PostPosted: Wed Aug 14, 2013 2:06 am
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

Re: Adding additional subforms to a form

PostPosted: Wed Aug 14, 2013 7:57 am
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.

Re: Adding additional subforms to a form

PostPosted: Wed Aug 14, 2013 8:31 am
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

Re: Adding additional subforms to a form

PostPosted: Fri Jan 08, 2016 4:52 pm
by dar_jab
Hello.
DACM whether you can sample file of the example described above?

Re: Adding additional subforms to a form

PostPosted: Fri Jan 15, 2016 11:51 pm
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.

Re: Adding additional subforms to a form

PostPosted: Mon Feb 12, 2018 7:28 pm
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.

Re: Adding additional subforms to a form

PostPosted: Mon Feb 12, 2018 10:40 pm
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.

Re: Adding additional subforms to a form

PostPosted: Mon Feb 12, 2018 11:04 pm
by Happy2018
PERFECT! You are a godsend!

Thank you!

Re: Adding additional subforms to a form

PostPosted: Mon Feb 12, 2018 11:27 pm
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

Re: Adding additional subforms to a form

PostPosted: Mon Feb 12, 2018 11:29 pm
by Happy2018
My apologies for the 2nd post, I ouldn't find the edit button above.

Re: Adding additional subforms to a form

PostPosted: Mon Feb 12, 2018 11:30 pm
by Villeroy
This is not a subform. It is a main form. And it has no record set (no table, query, SQL statement).

Re: Adding additional subforms to a form

PostPosted: Tue Mar 13, 2018 3:09 am
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