linking data

K

kenien

hello all, i have an access question.
what i am trying to do is make a mailing list. i have 3 tables and a query.
the tables are company, which has information on a company itself, contacts,
which has contact information, and titles, which is just a list of job titles
i was able to make a query that has listed the companies addresses next to
them relative to the actual company, based off of the companies table. thats
all fine and dandy.. what i would like to know is, how can i achieve this
same thing in the contacts table? (translation, i want the addresses to come
up automatically)

the contacts have the companies next to them, the values are availible from
a list (drop down) i want the address to popup in the next column. is this
possible?
 
J

John W. Vinson

hello all, i have an access question.
what i am trying to do is make a mailing list. i have 3 tables and a query.
the tables are company, which has information on a company itself, contacts,
which has contact information, and titles, which is just a list of job titles
i was able to make a query that has listed the companies addresses next to
them relative to the actual company, based off of the companies table. thats
all fine and dandy.. what i would like to know is, how can i achieve this
same thing in the contacts table? (translation, i want the addresses to come
up automatically)

the contacts have the companies next to them, the values are availible from
a list (drop down) i want the address to popup in the next column. is this
possible?

I presume that the Contacts table has a CompanyID as a link to the Companies
table?

If so, just create a Query in the query design window. Add the Companies table
and the Contacts table. If Access doesn't do so automatically join them on the
CompanyID. Include whichever fields you would like to see from both tables
(e.g. the contact name and title, and the company address).


John W. Vinson [MVP]
 
K

kenien

John W. Vinson said:
I presume that the Contacts table has a CompanyID as a link to the Companies
table?

If so, just create a Query in the query design window. Add the Companies table
and the Contacts table. If Access doesn't do so automatically join them on the
CompanyID. Include whichever fields you would like to see from both tables
(e.g. the contact name and title, and the company address).John W. Vinson [MVP]
in the "contacts" table is a column for "company_name" which is linked in my
relations to "company_name" which is the PK for the "companies" table. what
should be in my "comp_address" field? a lookup? should it be linked?
 
J

John W. Vinson

in the "contacts" table is a column for "company_name" which is linked in my
relations to "company_name" which is the PK for the "companies" table. what
should be in my "comp_address" field? a lookup? should it be linked?

STOP.

You're making this much harder than it is, thanks to Microsoft's misguided
Lookup Fields, subdatasheets, and other "spinach" getting in the way!

Create a new Query.
Add the Companies table and the Contacts table.
If Access doesn't do so automatically (which suggests that you don't have a
Relationship defined), drag the company_name field from the Companies table to
the company_name field in the Contacts table to link the two.
You'll see a scrollable list of fieldnames in both the Companies table icon
and the Contacts table icon.
Doubleclick on whichever fields you want to see - or click and drag them into
the query grid.

You don't say what the fieldname for the company's address is - if it's named
comp_address in the Companies table, then just use it.

If you're used to working in table datasheets... don't. Tables are for data
storage, not for interaction with the data!!!

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top