Hi,
Contact and Activity table - one to many relationship,
Now I need to design a form either main sub or a couple of tablecontrols where I first select an activity from the activity table which then will display all those contacts who like skiing, etc.
My minds gone completely blank on how to use multiple master slave links.
The attached is just a dummy, in the real db the activity is an integer from a referencetable.
Thanks for your thoughts.
[Solved] Main subform linking
Re: main subform linking
In real life this would a many-to-many relation. Each person can be assigned to many activities and vice versa. Your one-to-many relation assigns each activity to one person. Therefore you can not select an activity and get all the related persons since there can be only one person per activity.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Main subform linking
Find attached your file, modified, according to the idea of Villeroy, as a sample.
- Attachments
-
- mto.odb
- (13.7 KiB) Downloaded 182 times
- MMove 1.0.6
- Extension for easy, exact positioning of shapes, pictures, controls, frames ...
- my current system
- Windows 10 AOO, LOLinux Mint AOO, LO
Re: Main subform linking
Wow, fantastic and thank you F3K Total and Villeroy !!! Exactly what I have in mind.
Aah, and thanks for refreshing my memory Villeroy. Of course I need a junction table which means a bit of a redesign of my mainform (see attachment).
The goal is to display in a different form then three table controls to tell the story of
Activity Category Activity Contact
select one pick one display all contacts who like Golf
To do that I need to change the Description to a Category table (Junction) tblContactsActivities as per F3K Total
In the mainform put the Category field of the category table in front of the activity
Some how filter(sync) the Activity listbox by the selection of the Category listbox, would you have an example of that as I also could use that for country and region
Thanks a lot guys for your time and help
Aah, and thanks for refreshing my memory Villeroy. Of course I need a junction table which means a bit of a redesign of my mainform (see attachment).
The goal is to display in a different form then three table controls to tell the story of
Activity Category Activity Contact
select one pick one display all contacts who like Golf
To do that I need to change the Description to a Category table (Junction) tblContactsActivities as per F3K Total
In the mainform put the Category field of the category table in front of the activity
Some how filter(sync) the Activity listbox by the selection of the Category listbox, would you have an example of that as I also could use that for country and region
Thanks a lot guys for your time and help
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend
Re: Main subform linking
upload a sample containing all tables and their relations...
- MMove 1.0.6
- Extension for easy, exact positioning of shapes, pictures, controls, frames ...
- my current system
- Windows 10 AOO, LOLinux Mint AOO, LO
Re: Main subform linking
Hi, here s a quick and dirty mockup of my intentions put together at candle light (having some power outages here.)
The contact add edit form should allow multiple activities by different categories using listboxes, the selection of activity however limited to the category chosen.
The one and only query seems to to the right thing, the type acvtivity maintenance form is used to poulate the activities table
The original activity matching form needs a third control for the category ie
first select category, then select activity resulting in all contacts engaged in it
Hope this makes sense
GK
The contact add edit form should allow multiple activities by different categories using listboxes, the selection of activity however limited to the category chosen.
The one and only query seems to to the right thing, the type acvtivity maintenance form is used to poulate the activities table
The original activity matching form needs a third control for the category ie
first select category, then select activity resulting in all contacts engaged in it
Hope this makes sense
GK
- Attachments
-
- mockup.odb
- (32.8 KiB) Downloaded 177 times
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend
Re: Main subform linking
Try attached version using no listboxes. It's done without a macro. If you want to have a cascading listbox, there are tutorials in this forum, e.g. here: viewtopic.php?f=100&t=94393&p=449618&hi ... ng#p449618
R
R
- Attachments
-
- mockup.odb
- (34.92 KiB) Downloaded 169 times
- MMove 1.0.6
- Extension for easy, exact positioning of shapes, pictures, controls, frames ...
- my current system
- Windows 10 AOO, LOLinux Mint AOO, LO
Re: Main subform linking
Thank you very much, appreciate it.
Greetings from Chile
Greetings from Chile
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend