johnjenkins
11-10-2007, 02:22 PM
I am fairly new to Access and i am trying to create a database that stores member's details and records the payments that they make monthly.
I have 2 tables:
Members:Id number
Fname
Sname
etc
and
Fees:
Id number
Fname
Sname
Amt paid Jan
Amt paid Feb
etc
What i want to happen is that any member's details entered in the members table also appears in the Fees table so that only the amout paid needs to be entered.
Is this possible?
boblarson
11-10-2007, 02:27 PM
You do not want to store the same information in the fees table. That violates normalization rules. You would need to do it this way:
Members
MemberID - Primary Key (Autonumber) ' doesn't have to be but is easier if you don't have an ID already to use
Fname
Sname
etc
Fees
FeesID - Primary Key (Autonumber)
MemberID - Foreign Key (Long Integer) ' This is what ties the member and fees tables together.
DatePaid - Date
You do not want separate columns for separate dates (that is also repeating fields and violates normalization rules). Don't think in spreadsheet terms (short and wide). Think in relational database terms (thin and long). If you do it this way then you can use queries more easily to get what you want back out of it.
johnjenkins
11-10-2007, 03:11 PM
Thanks, I have tried this but the ID entries in the members table do not appear in the Fees table. I have created a one to one relationship between the 2 members ID fields, is that correct?
boblarson
11-10-2007, 03:15 PM
No, what you need is a form and subform. The form would be for the members and the subform would be for the fees because the relationship is actually a one-to-many relationship.
boblarson
11-10-2007, 03:31 PM
Here's a quick sample I came up with for you.
johnjenkins
11-11-2007, 11:56 AM
Thanks Bob, works a treat and I've sorted the calculated query for the arrears.