HELP WITH CALCULATION IN DATABASE

G

Guest

Good night,
I am doing a database that is designed to do three main
things:
(1) Accept input of personal information of the members of a church and
(2) Accept input of financial information of the members of the church
including their Tithe Amounts, General Offerings Amount and Offerings that
are allocated to several departments of the church.
(3) Output a Total (in the form of a report) that would sum all of the
entries that are stored in the database under tithe amounts as 'Conference
Funds' and all of the entries that are stored under general offerings and
department offerings as 'Total Church Funds'

Below is a copy of the pseudocode:

MODULE 1-3
Calculate_Total_Conference_Funds
{
FOR EACH MemberTithe
RETRIEVE records from Database
ADD all funds from Records
STORE as Total_Conference_Funds
}

MODULE 1-4
Calculate_Total_Church_Funds
{
FOR EACH GeneralOfferings
RETRIEVE records from Database
FOR EACH Dept_Offerings
RETRIEVE records from Database
CALCULATE Total_Church_Funds= Dept_Offerings + General Offerings
STORE as Total_Church_Funds
}

MODULE 1-5
Output_General_Report
RETRIEVE Total_Church_Funds from database
RETRIEVE Total_Conference_Funds from database
OUTPUT General_Report

i have done everything already, i have the forms linked to tables so
everytime something is entered, it updates the database

QUESTION: how do i get the database to total all the inputs for tithe
amount- and output it as Conference Funds, all the inputs of general
offerings amount and departmental offerings amount and output it as total
church funds?
 
T

Tim Ferguson

QUESTION: how do i get the database to total all the inputs for tithe
amount-
and output it as Conference Funds, all the inputs of general
offerings amount and departmental offerings amount and output it as
total church funds?

Sorry: because I cannot see your database I don't recognise the language
you are using, but in general the answer is to use a query. It would be
something like

SELECT DonationType, SUM(Amount) AS AmountGiven
FROM Donations
GROUP BY DonationType
WHERE #2006-01-01# <= DateGiven
AND DateGiven < #2006-04-01#

but the details really depend on your table structure. That is why
getting the tables and db design is so critical.

Hope it helps

Tim F
 
G

Guest

QUESTION: how do i get the database to total all the inputs for tithe
amount- and output it as Conference Funds, all the inputs of general
offerings amount and departmental offerings amount and output it as total
church funds?

ANSWER: The database doesn't do that. reports and queries do...
 

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