[Solved] Adding a subform

Creating and using forms
Post Reply
Rupe
Posts: 4
Joined: Sat Mar 07, 2009 6:43 pm

[Solved] Adding a subform

Post by Rupe »

I created a subform control within the Form Navigator, but it doesn't show on my main form. How do I make the subform visible?
Last edited by Villeroy on Sat Mar 07, 2009 11:12 pm, edited 1 time in total.
Reason: Tagged [Solved]
OOo 3.0.X on Ms Windows XP
User avatar
Villeroy
Volunteer
Posts: 31345
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Adding a subform

Post by Villeroy »

A form is an abstract, invisible container which serves as a bridge. On the one side it pulls data from the connected database, on the other side it provides the logical context for the visible controls you attach to it. Subforms do the same thing with an additional limiting connection to a parent form, including only those records where some field(s) match with some other field(s) of the parent form's currently selected record.
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
Rupe
Posts: 4
Joined: Sat Mar 07, 2009 6:43 pm

Re: Adding a subform

Post by Rupe »

Ok, ya I just figured that out. I found the add field button, though what I really want is a grid to show multiple records at a time. I went through the form creation wizard to see what it would look like if I had selected a subform from the start and it seems to be using a table control to display the data. How would I do this without the wizard? I can't seem to add a table to the subform and the tables that I can add to the main form I can't figure out how to databind like the wizard did.
OOo 3.0.X on Ms Windows XP
User avatar
Villeroy
Volunteer
Posts: 31345
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Adding a subform

Post by Villeroy »

Rupe wrote:I found the add field button, though what I really want is a grid to show multiple records at a time.
It shows a little window of all the fields connected to the currently selected form. Drag a field onto your form. You get a grouped pair of a label with a text box. Right-click the text box in the navigator (or Ctrl+Click, then right-click the box itself) and replace the text box with another suitable type of control.
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
Rupe
Posts: 4
Joined: Sat Mar 07, 2009 6:43 pm

Re: Adding a subform

Post by Rupe »

Ok, but is there any way to use a grid style layout instead of free flow form type? Oh and there seems to be a bug too. When I try to change one of the fields to a label field (because I only want the value displayed) Base crashes.
OOo 3.0.X on Ms Windows XP
User avatar
Villeroy
Volunteer
Posts: 31345
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Adding a subform

Post by Villeroy »

Ouch, the crash is one of the bugs in 3.0 that has been fixed in 3.0.1. In 3.0 you need to replace the control manually. Delete the old one and draw a new one from the tool bar. Restore the field binding.
Toolbar "Fom Controls" has a button "More Controls". It pops up a second toolbar with additional tools. One of them lets you create a table control. A table control is not bound to fields. It's just another way to represent normal controls. Each column in a table control represents a "flat control" (list/text/combo box, numeric field, date field,...). Every row represents one record of the form's record set, so you can see more records than just the currently selected one.
You can have an additional grid view for any form when you hit the last button on toolbar "Form Navigation" (the toolbar which is enabled while you work with the form). The grid view is shown in the beamer window. From there you can drag selections of (multiple) rows, columns, values or the entire row set into arbitrary office documents. It is also useful when you want to delete more than one record.
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
Rupe
Posts: 4
Joined: Sat Mar 07, 2009 6:43 pm

[Solved] Re: Adding a subform

Post by Rupe »

Thanks, that did it. The table control was what I was after. I couldn't figure out how to add it directly to the subform but I could move it into the subform after adding it to the main form and then dragging it into the subform from the Form Navigator.

On a lower note, I am running 3.0.1. I actually just downloaded my copy about a week ago. There also seems to be some issues with the save on close dialog not saving, though things seem to work fine with the save button.
OOo 3.0.X on Ms Windows XP
Post Reply