How to display field from another table on a form? (very simple) (1 Viewer)

RSIboy

Registered User.
Local time
Today, 07:07
Joined
Jul 1, 2004
Messages
32
Apologies if this is real beginners stuff - couldn't find anything from a search.

I have a Company table, with CompanyID, and CompanyName. I then have a Policy table (one customer can have many policies) - with PolicyID, PolicyNumber, and CompanyID (which links the policy to the company table).

I have a policy form which displays the policy fields, but I would like it to also display the CompanyName, which is derived from the CompanyID.

In English, I want to create a text box which says "display CompanyName from table Company where CompanyID is equal to the current CompanyID from form Policy"

How do I achieve this in Access?

TIA

Dale
 

CBragg

VB Dummy
Local time
Today, 07:07
Joined
Oct 21, 2002
Messages
89
Think i understand what you are trying to do.

In the past i have based a new query on the two tables. Include the CompanyID from your customer table and the details you want to show from the other table.

In the form change the Company ID to a combo box and make that bound to, say the CompanyName. If you add the other fields to the form this should then display them automatically.

Hope this makes sense, is hard to work through when its not in front of you!!
 
Last edited:

maxmangion

AWF VIP
Local time
Today, 07:07
Joined
Feb 26, 2003
Messages
2,805
you need to create a query, set the relationship between companyID in your two tables and then select which fields you want in your form to be displayed.

Then create the form from your query and not directly from your tables.
 

Users who are viewing this thread

Top Bottom