Ask Your Question
0

Fill fields with *two* mother tables ? [closed]

asked 2019-05-25 08:48:43 +0200

Sinisan gravatar image

Hi all,

I need your help to solde something's probably easy to do, but I can't find the solution (and I looked for on LOT of forums ^^) : as you'll see in my sample, a table is linked to 2 difference tables, with no links between the 2 "parents" (except the daughter, so :)).

I would like to choose the value (existing record) for the first table (mother 1), choose the value (existing record) for the second (mother 2) and then populate values for the fields of the child.

It's ok, using form and sub-forms, for one parent, but I don't know how to do for the second one.

The sample here is showing you my problem (you'll see a N-N link for one side, but it's not a problem :))

thank you for your help !

C:\fakepath\SinBDDExemple01.odb

LibreOffice Version: 6.2.3.2, MacOS.

edit retag flag offensive reopen merge delete

Closed for the following reason question contains offensive or malicious remarks by Sinisan
close date 2019-05-28 13:44:17.635117

Comments

Please note using link when cross posting. Also posted here -> https://ask.libreoffice.org/fr/questi....

This saves duplicate efforts!

Ratslinger gravatar imageRatslinger ( 2019-05-27 03:41:38 +0200 )edit

It was not a waste and duplicate effort for me to write two messages with different languages : as you probably noticed, one of the message is in French and the other in English. It seems that all people doesn't have your foreign language skill and are reading mother language questions :). I also noticed that nobody answered both sides : I'm happy to avoid people duplicate efforts. Thank you.

Sinisan gravatar imageSinisan ( 2019-05-27 07:35:40 +0200 )edit

@Sinisan It was some waste since you had someone else work on a problem already answered and this resulted in nearly the same answer. Duplicate effort! You need to consider others.

I only use English - all else is Google! Amazing what can be done if one wants to. Have presented answers in other Ask language sites. There are many others who do so also.

Both sites did present a valid answer but you did not like what was presented. Please see edited answer (one which I had already given you - macro) for a sample of what you wanted.

Ratslinger gravatar imageRatslinger ( 2019-05-28 01:00:20 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-05-25 19:23:39 +0200

Ratslinger gravatar image

updated 2019-05-28 00:53:07 +0200

Hello,

There is doubt as the validity of this entire process. As to filling a form from two other forms this is usually done with list boxes. There is no linking in Base from two main forms to a sub form; appears this is truly the many-to-many record.

The real question here comes with the process already in place using the main -> sub form -> sub sub form. The sub form is a query. This data is volatile. What is entered today is not what it may be tomorrow thus making the data in TResponses invalid. Because of the query, there is no chain to update.

It appears this should be simplified.

Edit 2019-05-27:

Have attached a sample performing what you requested by using macros. Based upon a comment of yours, it appears you do not know how to write macro code. This is going to make using any of this harder as this is not the place to teach one how. This is a difficult process for one beginning with code.

Also, as stated earlier:

There is doubt as the validity of this entire process.

When you inspect the displays you will see that there is no direct relation in the Responses table back through the Groups table. I would avoid this process entirely but I've stated that already and this is what you asked for.

Sample ----- FillSubFormMacro.odb

edit flag offensive delete link more

Comments

Thank you for your answer. I was not clear, so let's forget the first sample and try something else, simplified : - a table "Country" - a table "decade". - a table "person", with a link to Country and a link to Decade.

What I want to do is to add some people in my base, BUT I would like to first select the Country on which I'll work for the moment (I don't want to add Countries here, just select existing one). I also want to select the Decade (I don't want to add Decades here, just select existing one). Now that's the both informations have been selected (on which country and with decade I'll work during this session), I want to be able to add or modify people. I really don't want to select country and decade each time I add or modify people.

As ...(more)

Sinisan gravatar imageSinisan ( 2019-05-25 20:00:41 +0200 )edit

Only possible method I can visualize for that is to use macros. This would need to be written specifically for your process. Again, there is nothing in Base to link two main forms to a single sub form which is what it appears you want.

Ratslinger gravatar imageRatslinger ( 2019-05-25 20:13:08 +0200 )edit

Thank you for your answer. Again, I don't want to link two main forms to a single sub form, I want to populate a table without having to choose the same two things (value of fields) for each 30 or 40 records (which is the real job), as I said in the title. I already had a look on macro side, but I have no idea of the process. I'll keep looking for. Thank you

Sinisan gravatar imageSinisan ( 2019-05-26 07:46:13 +0200 )edit

Actually that is exactly what you are trying to accomplish - link two main forms to a sub form. This linking (in form property) is how the data is automatically placed within those fields linked.

Ratslinger gravatar imageRatslinger ( 2019-05-26 17:04:10 +0200 )edit

You know what I know or not, you know what I want or not : thank you for all your effort and your waste of time.

Sinisan gravatar imageSinisan ( 2019-05-28 13:42:48 +0200 )edit

Question Tools

1 follower

Stats

Asked: 2019-05-25 08:48:43 +0200

Seen: 50 times

Last updated: May 28