Base: Using two table in forms and reports

Creating tables and queries
Post Reply
jebbers
Posts: 2
Joined: Mon Dec 03, 2007 8:43 pm

Base: Using two table in forms and reports

Post by jebbers »

Can someone tell me how I can use two tables (related) in a form, queries, and in a report? I'm not having any luck when I try to incorporate two tables into a form and with a report.

Thanks.
User avatar
kabing
Volunteer
Posts: 678
Joined: Fri Nov 23, 2007 12:05 am
Location: Midwest, USA

Re: Base: Using two table in forms and reports

Post by kabing »

There are several different approaches, depending on exactly what it is you are wanting to do.

For forms, if you want the data to be editable, you need to add a subform for each additional table beyond the first one. There is a NeoOffice tutorial for doing so here. Since NeoOffice is based on OpenOffice.org, the instructions should work fine for OpenOffice.org, if you keep the following things in mind:

1) references to the command key in a Neo tutorial are the equivalent to the control key in OOo. (i.e. Command-C becomes Control-C) Note that I'm not sure if this is true with OOo for X11.
2) control-clicking is the same as right clicking
3) icons sometimes look different, as NeoOffice 2.2.2 has a custom icon set.

If you don't need the data to be editable, you can base the form on a query and not have to mess with subforms. A NeoOffice tutorial for combining tables in a query, available here.

There are probably tutorials written for OpenOffice.org on these subjects, but I'm not sure where. You could try googling.

I've not worked with reports much, but I'm guessing you'll need to base the report on a query.

hope that helps a little bit.

kabing

Edit: I forgot to say, sometimes the Query Wizard won't complete if more than one table is used. In those cases, you need to create the Query in Design view. The tutorial I referred you to uses the Design view for this very reason.
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)
Post Reply