Help Defining the Relationship between Two Tables

kaibe13

New member
Local time
Today, 13:31
Joined
Jul 31, 2013
Messages
1
Hello,

I am hoping someone can help me with a database I am working on for my Church. The object is to combine our various revenue streams into one database for easier reporting and querying. I haven't used a lot of Access in my professional life (I'm an accountant, not a programmer), so I'm more or less teaching myself as I go. So far, I've been able to create modules for most of our revenue streams without much issue. However, I'm stuck on the one that I thought would be the easiest going in to the project.

The current module would be based on our Stewardship information. I am trying to track the annual pledges of our Congregation, along with their weekly payments. I have a table for members (tbl_Members) which includes their personal information. I have a table for the pledge amounts (tbl_Pledges) which links to the member's name in tbl_Members and includes the annual amount of the pledge, the year, a yes/no box indicating whether they would like to receive envelopes and the envelope number (filled in after the fact, once assigned). Finally I have a table for payments (tbl_Payments) which includes the date of payment, the type of payment (chk/cash), the amount of the payment and the check number.

My problem is how to relate the payment table back to the pledge table. The envelope numbers are re-used year after year, but are not necessarily assigned to the same member, so I can't just link the envelope number alone to the payment table. I need to use some combination of the envelope number and the year.

Ultimately, I would like the form for the payments to filter based on year, so the Parish secretary would enter the pledge year and all the envelope numbers for that year populate a list table. She could then just tab down to the correct envelope number to enter the payment information each week. That payment information is saved tbl_Payments which (somehow) links back to the original pledge in tbl_Pledges. From there I can create queries and reports to calculate balances due, etc.

If I write a query that combines the envelope number and year, is it still possible to filter the payment form based on year alone? Even then, I’m still not sure how I would link all the payments back to the correct pledge.

Either I’m missing something obvious and making this far too difficult, or this is really a much more complex module than I anticipated. Either way, I’m stuck. I appreciate any ideas, suggestions, criticisms or direction. I’m happy to do the research; I’m just at a loss as to where to go from here.
Thank you,
Susan
 
Hello,

I am hoping someone can help me with a database I am working on for my Church. The object is to combine our various revenue streams into one database for easier reporting and querying. I haven't used a lot of Access in my professional life (I'm an accountant, not a programmer), so I'm more or less teaching myself as I go. So far, I've been able to create modules for most of our revenue streams without much issue. However, I'm stuck on the one that I thought would be the easiest going in to the project.

The current module would be based on our Stewardship information. I am trying to track the annual pledges of our Congregation, along with their weekly payments. I have a table for members (tbl_Members) which includes their personal information. I have a table for the pledge amounts (tbl_Pledges) which links to the member's name in tbl_Members and includes the annual amount of the pledge, the year, a yes/no box indicating whether they would like to receive envelopes and the envelope number (filled in after the fact, once assigned). Finally I have a table for payments (tbl_Payments) which includes the date of payment, the type of payment (chk/cash), the amount of the payment and the check number.

My problem is how to relate the payment table back to the pledge table. The envelope numbers are re-used year after year, but are not necessarily assigned to the same member, so I can't just link the envelope number alone to the payment table. I need to use some combination of the envelope number and the year.

Ultimately, I would like the form for the payments to filter based on year, so the Parish secretary would enter the pledge year and all the envelope numbers for that year populate a list table. She could then just tab down to the correct envelope number to enter the payment information each week. That payment information is saved tbl_Payments which (somehow) links back to the original pledge in tbl_Pledges. From there I can create queries and reports to calculate balances due, etc.

If I write a query that combines the envelope number and year, is it still possible to filter the payment form based on year alone? Even then, I’m still not sure how I would link all the payments back to the correct pledge.

Either I’m missing something obvious and making this far too difficult, or this is really a much more complex module than I anticipated. Either way, I’m stuck. I appreciate any ideas, suggestions, criticisms or direction. I’m happy to do the research; I’m just at a loss as to where to go from here.
Thank you,
Susan

Not sure how your tblPayment relates to anything else. Is there a foreign key you didn't mention?

Finally I have a table for payments (tbl_Payments) which includes the date of payment, the type of payment (chk/cash), the amount of the payment and the check number.

tbl_Payment:
date / type / amt / chkNo

Above fields do not relate to any person, nor do they appear to have any unique identifier (aka. PKey)

Given your problem description, it should be fairly simple to add a Pkey and FKey to all your tables to relate them however you intend.
 
Susan

You're very word descriptive in outlining your situation but we here like to know the primary key field (PKey) for the tables because that determines the link to other tables.

You have a tblPledges and hopefully a unique autonumber key field called something like PledgeID. The table should include a MemberID field, a foreign key (FKey) which links to a particular member.

Your tblPayments should include a foreign key, PledgeID, which links the payment to a Pledge. This way you can sum all the payments with the same PledgeID to find the total amount paid against the Pledge.

Going forward, you will probably be adding a Banked (Yes/No) field to your payments table so you can determine payments received that are yet to be banked. This can also help generating a report for your bank deposit of several cheques and cash.
 

Users who are viewing this thread

Back
Top Bottom