Creating working subforms

Creating and using forms

Creating working subforms

Postby djsmith » Fri Nov 30, 2007 6:17 pm

All,

I am trying to create active subforms in a mainform. According to the documentation that comes with OpenOffice, you can create a subform to either display or enter data from or to a table not associated with the main form. When I do create a subform and associate it to a different table, any control that I create is not usable when I go out of design mode. :( I have tried to get the subform to work in two ways:

1. Manually creating the subform in the Form Navigator, updating the data tabs, creating the controls and populating the control properties. Result - inactive (and useless) controls. :(

2. As per the documentation, creating a form with the proper controls (that actually work) then dragging the form to my main form to create a subform. Result - can drag the form (intended subform) but it won't allow me to drop it into my main form. :(

Is there something I am not doing? Has anyone else had a similar problem that they've been able to overcome? Any help is greatly appreciated.
djsmith
 
Posts: 1
Joined: Fri Nov 30, 2007 6:04 pm

Re: Creating working subforms

Postby DrewJensen » Fri Nov 30, 2007 6:26 pm

Possibly - when you add a sub form you need to setup the columns that link the two together.

Open the forum in edit mode and the form navigator. Select the sub-forum control ( the dataform control ) and open the property editor. You will find two properties:
Link Master Fields
Link Slave Fields

Click on the button to the right of ether of these and you get a dialog box that allows you create the needed links - until this is done the sub form is inactive.
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
User avatar
DrewJensen
Volunteer
 
Posts: 1734
Joined: Sat Oct 06, 2007 9:01 pm
Location: Cumberland, MD - USA

Re: Creating working subforms

Postby gleweliz » Mon Dec 10, 2007 4:08 pm

I'm having the same problem and I have a really dumb question. I can't find the Link Master Fields and Link Slave Fields buttons. I've tried clicking on the Form Navigator. Then on Forms, New, Form. Then right click on Standard, click on Data, set the content type to Table and the Content to the table I want to use. There is a ... button next to Content that I suspect may be the one I need, but it is greyed out. Where do I go from here? I'm using OO 2.3.1 and Windows XP.
Thanks!
gleweliz
 
Posts: 11
Joined: Wed Nov 28, 2007 3:41 pm
Location: Michigan, USA

Re: Creating working subforms

Postby kabing » Mon Dec 10, 2007 8:29 pm

I think it's because the "Standard" form you created is a mainform, not a subform. The Slave and Master field controls are in the subform property box.
To create a subform, you need to right click on the main form in the Navigator, then choose New>Form. This will create a subform. Now right click on the subform and choose Properties. The Slave and Master fields are on the Data tab.

kabing

(I'm working in NeoOffice, which is based on OOo2.2.1, not 2.3.1, but I don't think that makes a difference here.)
NeoOffice (app store version) OpenOffice.org 4.1 and LibreOffice 4.3 on Mac OS X El Capitan
OpenOffice.org 4.1.2 on Windows 10 (Previously on Vista)
User avatar
kabing
Volunteer
 
Posts: 678
Joined: Fri Nov 23, 2007 12:05 am
Location: Midwest, USA

Re: Creating working subforms

Postby gleweliz » Mon Dec 10, 2007 9:23 pm

Thanks for responding! I followed your instructions and went to the Data Tab in the Form Properties dialog box. The options listed are: Content Type, Content, Analyze SQL Command,
Filter, Sort, Allow Additions, Allow Modifications, Allow Deletions, Add Data Only, Navigation Bar, and Cycle. None of these seem to be what I'm looking for. Any suggestions?
Thanks very much!
Elizabeth
gleweliz
 
Posts: 11
Joined: Wed Nov 28, 2007 3:41 pm
Location: Michigan, USA

Re: Creating working subforms

Postby kabing » Mon Dec 10, 2007 9:39 pm

Are you sure you are right-clicking on the subform? That list sounds like the list for a mainform.

In the form navigator, a subform will be shown flush with the list of fields in the main form. (i.e. if you close the disclosure triangle for the main form, you can't see the subform. If you can see both forms with the disclosure triangle closed on the main form, you have two main forms, not a main form and a subform).

kabing
NeoOffice (app store version) OpenOffice.org 4.1 and LibreOffice 4.3 on Mac OS X El Capitan
OpenOffice.org 4.1.2 on Windows 10 (Previously on Vista)
User avatar
kabing
Volunteer
 
Posts: 678
Joined: Fri Nov 23, 2007 12:05 am
Location: Midwest, USA

solved Re: Creating working subforms

Postby gleweliz » Tue Dec 11, 2007 7:20 pm

Yes, I double-checked. I'm definitely right clicking on the subform. It appears exactly as you describe. But the list I get is not the subform list. I think you must be right that, for some reason, I'm getting the mainform list instead. I have no idea what to do about this! :?
gleweliz
 
Posts: 11
Joined: Wed Nov 28, 2007 3:41 pm
Location: Michigan, USA

solved Re: Creating working subforms

Postby gleweliz » Fri Dec 14, 2007 8:43 pm

I re-loaded Base and now it's working properly. Love those sub-forms! :D
Elizabeth
gleweliz
 
Posts: 11
Joined: Wed Nov 28, 2007 3:41 pm
Location: Michigan, USA


Return to Forms

Who is online

Users browsing this forum: No registered users and 2 guests