Jump to content

Relating multiple mailing addresses to individual Clients


This topic is 6083 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Here is what my bosses want:

The ability to store multiple mailing addresses for individual clients. Now, I know about setting up a key field relating my client table to my address table, using a one to many relationship so that 1 client can have many addresses. No problems there. However, my bosses don't want to have to use a portal and scroll through a number of addresses. They want to be able to display the one "preferred" address for the client in the same page as the rest of the client demographic information, but be able to change that preferred address to another address by, say, clicking a "preferred" checkbox on the record. They want to retain ALL the different addresses the client might have, and be able to pick and choose out of them. Possible? I've been thinking about things like having address calculation fields on my client layout that somehow "look up" what the "preferred" address is in the Adress table, but I just can't seem to make that happen.

So, my structure so far is:

Person table

person key - autogenerated serial #

First Name

Last Name

Address Table

person key - # that keys into Person Table

address key - autogenerated serial #

Address field - text address field

Link to comment
Share on other sites

Add a PreferredAddressKey field to the Person table, and define a relationship to a new occurrence of the Address table as:

Person::PreferredAddressKey = PreferredAddress::address key

Place a button in the existing portal that sets the PreferredAddressKey to Address::address key.

Link to comment
Share on other sites

Thank you VERY much! That works beautifully! I would have never thought of that (still not very good at wrapping my brain around WHEN I should use multiple relationships between the same data).

Link to comment
Share on other sites

This topic is 6083 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.