Creating subform based on a relation

Creating and using forms
Post Reply
andrewl
Posts: 2
Joined: Tue Aug 19, 2008 2:21 am

Creating subform based on a relation

Post by andrewl »

Hi there
I have set up a many to one relationship between 2 tables in a database, and am now trying to creating a form, using the Form Wizard, that includes fields from the related table. To do this I assume you set up a subform, based on an existing relation, but for some reason the 'based on existing relation' radio button is disabled. Can anyone suggest what I may be doing wrong?

Thanks,
Andrew Lonie,
Dunedin NZ
OOo 2.3.X on Ms Windows XP
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: creating subform based on a relation

Post by r4zoli »

You selected Add subform, and Subform based on existing relation, and selected the another table name?
Your tables must have Primary keys.
You can make a screenshot from your Relation design window?
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
andrewl
Posts: 2
Joined: Tue Aug 19, 2008 2:21 am

Re: creating subform based on a relation

Post by andrewl »

Thanks
here is a JPG of my Relationships window. What I am trying to do is create a form based on the Plant Activities table, and use a subform to bring through attributes from the Plant table.

But the option to create a subform based on a relation is grayed out, even though (I think) all my tables have primary keys
Attachments
relationships.JPG
OOo 2.3.X on Ms Windows XP
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: creating subform based on a relation

Post by r4zoli »

Its grayed out because your Plant Action table connected to Plant as subordinated, master/slave field relationship between two tables, you can only make MainForm-Subform with Plant-PlantAction, and not PlantAction-Plant.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
Post Reply