Discussion Locked

Access Database

0 helpful
12 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am working on a day care database that has children running up fees, parents who get charged with fees, and payments the parents make. Each fee and payment is referred to a parent by their ID number, and each fee and payment has a date and a description. I want to put these together, grouped by parent, ordered by date from past date to present, and calculate a balance, line by line. I want to be able to refer to that balance in other forms of the database. I want to refer to the latest balance a parent has. How should I set up the tables and forms so I can do this? Should I have separate tables: one for parent fee, one for child fee, one for payment? I tried this and could not group the dates as one field in my query. Or should I have one table with all finances: one field for date, one for parent fee, one for payment, one for child fee?

12 replies

by mbarker734

It would be better to keep the payments and charges in different tables, this will make calculations on amounts due and amounts recieved easier. Seperation of the child and parent charges could be made by different tables but you could easily indicate it with a yes/no field in one table and remarks indicating what the charges were for. Calculations of balances can be perform by using the DSum fuction to determine the appropriate total for the parentid in the fees table and subtacting it fromthe DSum of the payments table. Refence to the balance on other forms is achieved the sameway. NOTE: you can not cause a calculation for a field to accur on a calculated field of the form. The calculation would have to be performed in full forthe calculated field.

Hoe this helped

by donq

At a minimum you will need 5 Tables defining the 5 subjects you will be managing.

"Attendance", "Children", "Parents" (or guardians), "Payments", and "Fees".

Children will be the primary "noun" the Day Care Center Manages and Attendance and Payments (or "Invoices") will represent the primary "verb" (or actions the Day Care Center provides. Parents will be a FOREIGN KEY to Children (or an "adjective" descriptor) telling us who to bill and where to send the Invoice while Fees will define the Day Care centers Business Rules. I will send an Access 2000 ".mdb" file to the e-mail address shown shortly with a few more goodies in it 4 u. It sounds as though you are new 2 Access - it's fun but be careful what you promise beforeyou get your feet wet!

by donq

At a minimum you will need 5 Tables defining the 5 subjects you will be managing.

"Attendance", "Children", "Parents" (or guardians), "Payments", and "Fees".

Children will be the primary "noun" the Day Care Center Manages and Attendance and Payments (or "Invoices") will represent the primary "verb" (or actions the Day Care Center provides. Parents will be a FOREIGN KEY to Children (or an "adjective" descriptor) telling us who to bill and where to send the Invoice while Fees will define the Day Care centers Business Rules. I will send an Access 2000 ".mdb" file to the e-mail address shown shortly with a few more goodies in it 4 u. It sounds as though you are new 2 Access - it's fun but be careful what you promise beforeyou get your feet wet!

by donq

At a minimum you will need 5 Tables defining the 5 subjects you will be managing.

"Attendance", "Children", "Parents" (or guardians), "Payments", and "Fees".

Children will be the primary "noun" the Day Care Center Manages and Attendance and Payments (or "Invoices") will represent the primary "verb" (or actions the Day Care Center provides. Parents will be a FOREIGN KEY to Children (or an "adjective" descriptor) telling us who to bill and where to send the Invoice while Fees will define the Day Care centers Business Rules. I will send an Access 2000 ".mdb" file to the e-mail address shown shortly with a few more goodies in it 4 u. It sounds as though you are new 2 Access - it's fun but be careful what you promise before you get your feet wet! - Don Quigg

by bob sellman

Aren't ALL fees really for the children? If there are "family type" fees, they still can be tied to one child.

With that approach, things become simpler. Set up these tables:

Parents: ParentID, name, (etc.)
Children: ChildID, ParentID, child name, (etc.)
Fees: ChildID, date, amount, reasonID
Payments: ParentID, date, paid
Reasons: ReasonID, description, IsFamilyFee(a Yes/No column)

Fees that are family based can be identified with the appropriate reason.

Use grouping queries to calculate the current balance for a parent:

qgrpFees: relate the fees and children tables by the ChildID, then group on ParentID and Sum on Amount.

qgrpPayments: Using the Payments table, group on ParentID and Sum on paid.

qryBalance: relate the qgrpFees and qgrpPayments queries by the ParentID (be sure that all fees records are displayed and any matching payments are displayed) and display ParentID, Sum of Amount, Sum of Paid, and create a new column as Balance:[Sum of Amount]-[Sum of Paid]

The Balance will be positive with this equation if money is due. You can then use qryBalance to get the current balance for any place in your application as long as you know the parent ID. (Use the DLookup function, for example).

By the way, the Reasons table is really optional, but it serves a number of purposes: Simpler data entry, standard descriptions of fees, and reduced errors. It also makes it easier to build some queries showing the reasons for fees.

This discussion is closed to new replies.