OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Multiple sub forms

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
phredde
Newbie
Newbie


Joined: 23 Nov 2005
Posts: 1

PostPosted: Fri Nov 25, 2005 8:45 am    Post subject: Multiple sub forms Reply with quote

Hi all,

I have made my set of tables, and a form including one sub form. It works fine.

Question: how do I include more than one sub form in my form? (multiple tables)

Thanks!
Back to top
View user's profile Send private message
lichtenthal
Newbie
Newbie


Joined: 23 Nov 2005
Posts: 3
Location: Jena, Germany

PostPosted: Fri Nov 25, 2005 12:22 pm    Post subject: Reply with quote

Open the form for editing and then click on the Form Navigator. Then right-click the name of the main form (often called MainForm by default) and select New then Form. You can add any number of subforms this way. When you go back to editing the form, make sure the desired form (main form or subform) is highlighted in the Form Navigator when you add fields to your form.

Hope this helps!
_________________
lichtenthal
running SuSE Linux 9.3
KDE 3.4.0 Level b
OpenOffice 2.0 (release version)
MySQL 4.1 (with OpenOffice as frontend)
Back to top
View user's profile Send private message
Steven_Shelton
OOo Enthusiast
OOo Enthusiast


Joined: 26 Sep 2004
Posts: 104
Location: Michigan

PostPosted: Mon Dec 05, 2005 2:05 pm    Post subject: Hmm... Reply with quote

I'm trying to do basically the same thing, and I tried following this set of instructions but it didn't quite work the way I had expected.

Is there a way to import multiple existing forms as subforms?
Back to top
View user's profile Send private message Visit poster's website
Yumi
Power User
Power User


Joined: 22 Nov 2004
Posts: 51

PostPosted: Wed Jan 11, 2006 8:24 pm    Post subject: Fields not showing in 2nd Sub Form Reply with quote

I did as instructed and it shows the number of records in the linked Table. But it does not show any fields. How are those defined?
Back to top
View user's profile Send private message
Steven_Shelton
OOo Enthusiast
OOo Enthusiast


Joined: 26 Sep 2004
Posts: 104
Location: Michigan

PostPosted: Thu Jan 12, 2006 4:33 am    Post subject: Re: Fields not showing in 2nd Sub Form Reply with quote

Yumi wrote:
I did as instructed and it shows the number of records in the linked Table. But it does not show any fields. How are those defined?


I think I know what you're asking. You need to set a master and slave field, essentially. In other words, let's say your database is an inventory of your movies on DVD and VHS. You main table is "Movies", which contains the basic lowdown on each flick, with the following fields: "Title", "ProductionCompany", "Year", and "MovieID". "MovieID" is your primary key. Now, there may be multiple actors, so you want a subtable for actors in the movie, which might have "FirstName", "LastName", "DOB", and "ActorNumber" (the primary key). You'd need to add another field called "MovieNumber" (which tells the database which movies each actor should be linked to).

So what you'd do is create both tables, then go into relationships and drag a link from "MovieNumber" (in the Actors table) to "MovieID" (in the Movies table). Then you'd create your main form and add a subform as has been previously described (using the form navigator). Then there's one more step: in the form navigator, right-click on the subform name and select "properties". In the "Data" tab, the fields "Link master fields" and "Link slave fields" will appear about halfway down. You would need to assign the "master field" to "MovieID" and the slave field to "MovieNumber". After that, if I understand your problem correctly, it should work perfectly.
Back to top
View user's profile Send private message Visit poster's website
Yumi
Power User
Power User


Joined: 22 Nov 2004
Posts: 51

PostPosted: Thu Jan 12, 2006 7:03 pm    Post subject: Sub-sub form - solved Reply with quote

I was not precise enough. What I aimed to achieve is a Subform to a Subform. I found the solution in the Form Navigator. Depending to where the new form is put in the tree this defines its master. Soved and working. I think it would even allow more levels.

Your solution is working of course. And I used it in another instance where 2 forms are under the Main Form.
Back to top
View user's profile Send private message
chippy78
Newbie
Newbie


Joined: 28 Mar 2006
Posts: 1
Location: Marquette, MI

PostPosted: Tue Mar 28, 2006 6:41 pm    Post subject: Multiple Subforms... Reply with quote

I am trying to add another subform to an existing form, but I am having trouble. I am using version 2.0.2, but I can't find a location to right click to add a new form in the form navigator. Any suggestions?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group