depending on company name selected, show only related addresses

Mr_Si

Registered User.
Local time
Today, 10:53
Joined
Dec 8, 2007
Messages
163
Hi All,

In my contact entries for my database, there is a lookup for existing companies which allows us add another person and have them belong to the same company. I also have Address which is also a lookup to existing addresses, so the same can be said for that. Many people could live at one address.

What I would like to do is to have a function in this form that will show only the addresses related to that company appear in the address combo box, rather than every single address that is entered in the db.

Is there a way to do this?

I hope the question's pre-amble makes sense.

Many thanks,

Simon
 
Working on the assumtion that you have an addresses table similar to you contacts table that is linked via the company id you could filter out the addresses table using the same criteria. In addition to the actual address you should also have another field that indicates what type of address this is.

Invoice Address
Shipping address
Head office
Branch address
etc

Then next to the company name you could have a button that open up another form that shows all the addresses recorded for that company.
 

Users who are viewing this thread

Back
Top Bottom