handling shared address information (many-to-many VS one-to-many)

Olga W

Board Regular
Joined
Jun 16, 2010
Messages
53
I have taken a junction table approach to record shared addresses, linking addresses to people many-to-many to represent the fact that one address can belong to many people, and one person can have many addresses. But my problem with it is that when it comes to recording a new address as belonging to a particular contact, there are now more stages to the process than there would be if the relationship between people and addresses were one to many.

If I'm in a form whose record source is tblPeople, I can't have a subform into which I enter the new address, I can only have a subform that pulls up pre-entered addresses through a combo box drop down list. So I have to 1. check the address isn't on a LONG drop down list; then 2. click on a button taking me to a SEPARATE address form in which I enter the address; and then 3. return to my original person form and pull up the address I just entered to attach it to the person with the focus.

Whereas with a one-to-many relationship I could enter a new address directly into the subform on the person form.

I can convert the relationship between people and addresses to one-to-many, if on the one side of an address table I include the pkID key for a table in which relationships between people are stored. So the "one" thing I was joining to the address/adresses was "Frank and Lisa". but in terms of pulling up the correct information on an individual's form, I don't think I can make this work. I don't think I could link the main form to the subform so that it recognised that not only Franks records, but also records listed for "Frank and Lisa" should be displayed, even though the form's focus is Frank. It would have to trace back from the primary key in the people-to-people junction table, to the foreign keys that are linked together in it. <!--IBF.ATTACHMENT_2071547--><!-- THE POST -->
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Why don't you do it the other way round?

Add the address if it doesn't exist and then add the person.

If the address does exist then add the person.

I'm kind of basing that on most people only having one address though I suppose.

If a person has more than one address you would need to just repeat the process for all their addresses, but I doubt that would be too much work.

If you changed to relating people to people then it would change the whole thing.
 
Upvote 0

Forum statistics

Threads
1,221,889
Messages
6,162,627
Members
451,778
Latest member
ragananthony7911

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top