How to Create Relations

spooky30

Registered User.
Local time
Today, 18:50
Joined
Apr 20, 2006
Messages
15
I am making a cash book and am a newbie
Pls help

Tables
Type Of Transaction-Reciepts/Payments
Subheads-Reciepts
Subheads-Payments
Details-Reciepts
Details -Payments
Transactions
I would like to relate subhead fields in individual tables and relate them to only records in type of transaction
 
To establish a relationship, you need to consider how you identify that relationship.

The normal "identifier" is called a KEY. A relationship in Access requires that one participant in the relationship have what is called a PRIME KEY (which we abbreviate as PK in this forum.) The other participant in the relationship has a FOREIGN KEY (FK).

A PK must uniquely identify one record in table. A table with a PK is a viable candidate for the "one" side of a one-to-many relationship. (Or a many-to-one relationship.)

Therefore, the first part of setting up any relationship is to decide which tables will be the "one" side and which will be the "many" side for each relationship.

Further hints to consider: A one-to-many relationship USUALLY (but certainly not always) implies a parent-child or overview-detail relationship. A many-to-one relationship USUALLY (but certainly not always) implies a lookup of something.

Your "type headers" appear to be many-to-one. Your transaction details will probably be more along the one-to-many line.

My advice to you is that while you are still a newbie and don't have to be broken of TOO many bad habits, IMMEDIATELY read up on "Database Normalization." Access Help is a good place to start, followed by a visit to Wikipedia.ORG for that same topic, and finally choose your favorite browser to search that topic. Please note that any decent web browser will come back with just short of a gazillion hits on that topic, so be selective in the web articles. Limit yourself to a few articles from the .EDU (educational) domain, usually offered by colleges and universities. Read more than one article because there are many ways to say what needs to be said. When it all starts to get familiar, you can stop reading.

When you build a database in Access, you want to shoot for 3rd normal form, which you will understand once you have read up on normalization. I'll stop here because until you understand normalization, some of the topics you need will be absolute gibberish to you.
 
Hi Thanks for the replay and it is really appriciated but what i wanted to know was
1. I have a table- Type of Transactions containing field TOT with records reciept and Payment

2. Two other tables ie subhead-reciept & subhead-payment containing fields pertaining to either reciept or payment in TOT table i want to link only rct record in TOT table to rct-subhead table and second record ie payment in TOT table to 2nd table ie payment subhead
( logic is that that when i select reciept from TOT table only reciept subheads are chosen and like wise for payments ) but i am unable to link all three tables as there is no common field)
 

Users who are viewing this thread

Back
Top Bottom