Two Main Forms - is this possible?

Creating and using forms
Post Reply
guyvallero
Posts: 11
Joined: Mon Apr 07, 2008 8:13 am

Two Main Forms - is this possible?

Post by guyvallero »

Well, my question is slightly more complicated than the subject line because, using Form Navigator, I have been able to create two "Main Forms", each referencing a different table.

My goal is to display and edit a record that is a JOIN of two tables (via a simple INTEGER key ID that is defined in both: in one table it is a primary key, in the other it is a foreign key).

The "main table" (i.e. the one that has the ID as the foreign key and is used to select the corresponding record from the other table) could have multiple records pointing to a single record in the "other table" (that one that has the ID as primary key). This is almost obvious but I am mentioning this just in case (to clarify).

When I use a ListBox or a ComboBox for a field in the "other table", I can associate it with the corresponding record in the main table because the control has an SQL field in the 'Data' tab that allows me to perform a query that results in the displaying the desired content.

However, I cannot use a ListBox for all other fields in the "other table". Most of the fields in the "other table" require a TextBox. But a TextBox has no fields for customization/query in the Data tab.

My question is: How do I achieve my goal as outlined in the second paragraph of my question? In other words, how do I "join" two tables via a single screen (be it one form or multiple forms) such that all fields in the record are displayed and editable/update-able?

Thanks,
Guy
a signature
User avatar
kabing
Volunteer
Posts: 680
Joined: Fri Nov 23, 2007 12:05 am
Location: Midwest, USA

Re: Two Main Forms - is this possible?

Post by kabing »

Is there a reason why you can't/don't want to use a subform?

kabing
NeoOffice 2022.7 LibreOffice 24.8.4 on (Intel) Mac OS Ventura
guyvallero
Posts: 11
Joined: Mon Apr 07, 2008 8:13 am

Re: Two Main Forms - is this possible?

Post by guyvallero »

kabing wrote:Is there a reason why you can't/don't want to use a subform?
Can I accomplish what I described with a subform? If so, then no, I don't have a reason to not use subform.

Actually, what I would REALLY like is two subforms. Either that they are siblings, both subs for the main one or... one is a subform of the other subform. Is this possible? I know that using the Form Wizard this isn't supported but how about doing it by hand?

Is there any tutorial out there that explains the idea behind the forms? and the scripting language? (I am already familiar with SQL and the concept of the relational database).

Thanks,
Guy
a signature
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: Two Main Forms - is this possible?

Post by r4zoli »

Using forms: Roberto Benitez
OO Base tutorials (incl) Forms:sheepdog
Macro: Andrew Pitonyak
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
guyvallero
Posts: 11
Joined: Mon Apr 07, 2008 8:13 am

Re: Two Main Forms - is this possible?

Post by guyvallero »

r4zoli wrote:Using forms: Roberto Benitez
OO Base tutorials (incl) Forms:sheepdog
Macro: Andrew Pitonyak
Thank you very much, r4zoli!

I have already started learning via the sheepdog web pages. It will take me a while before I can return with more intelligent questions.

In the meanwhile, I can say that from my personal point of view, the sheepdog's tutorials are clearer and more effective than chapter 10 in the official Getting Started Guide.

Thanks,
Guy
a signature
Post Reply