help

M

Manoj

hi, I am creating a database for supply chain.I have some questions.
My first table has Site Index (PK)
site index
site name
site type.

Second entity is Transit time. I want to set up the link between these two
entities (site and Transit time)such that I can put the transit time between
the source site and destination site(both of these are from site entity).
Now the problem I am facing is how to define the relation.As I have one
primary key for site and may be one for Transit time.

Waiting for reply...Thanks in advance for any reply.
 
K

KARL DEWEY

Your TransitTime table needs to contain at least three fields --
Orgination - from SiteIndex
TransitTime
Destination - from SiteIndex

In the Relations View add first table twice. The second one qill have a -1
(Dash One) as suffix. Also put your TransitTime table between these two.
Drag from SiteIndex of first table to Orgination of the TransiTime table.
Create a one-to-many relation. Click on referentail and cascade update
related fields.

NOTE - Read up on cascade delete before using.

Drag from SiteIndex of second SiteIndex table to Destination of the
TransiTime table. Create a one-to-many relation. Create a one-to-many
relation. Click on referentail and cascade update related fields. Save.
 
J

John Vinson

hi, I am creating a database for supply chain.I have some questions.
My first table has Site Index (PK)
site index
site name
site type.

Second entity is Transit time. I want to set up the link between these two
entities (site and Transit time)such that I can put the transit time between
the source site and destination site(both of these are from site entity).
Now the problem I am facing is how to define the relation.As I have one
primary key for site and may be one for Transit time.

Waiting for reply...Thanks in advance for any reply.

You need to add the Sites table to your relationship window TWICE:
Access will alias the second instance by appending _1 to its name.
Assuming your Transit table has fields SourceSite and DestinationSite,
join SourceSite to Sites.SiteIndex, and DestinationSite to
Sites_1.SiteIndex.


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

Top