Results 1 to 9 of 9
  1. #1
    elitehass is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2013
    Posts
    5

    Calculating Membership Fee from a field in another table?

    Hi, I've made a membership database for an imaginary leisure centre as part of my A Level coursework - only after more or less finishing my project, I've realised that I haven't provided a way for the end users to calculate fees for members.


    I really have no idea how to do this, I suppose the calculation I would have to do is multiply the Length of Membership (days) field on the Membership Opportunities by Cost per Month on the MembershipTypes table.
    How do I do this?!
    These are the relevant tables and I've also attached my database (the password is "password" for any of the users):

    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    There is no table for recording the monthly obligation.

    There is no table for recording payments received.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    elitehass is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2013
    Posts
    5
    Quote Originally Posted by June7 View Post
    There is no table for recording the monthly obligation.

    There is no table for recording payments received.
    The membership opportunities table has a field for recording whether a member has paid, I realise this database isn't exactly perfect but I really don't have time
    What do you mean by recording monthly obligation?
    Do I need these tables for the calculation?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Most people pay their expenses month-to-month, such as athletic club membership. Sign up for membership at some level of participation, club sends you a bill each month, pay bill. A normal database would have tables to record these monthly billings and receipts.

    I can't look at your db until later tonight. Will see what I can come up with.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    elitehass is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2013
    Posts
    5
    Quote Originally Posted by June7 View Post
    Most people pay their expenses month-to-month, such as athletic club membership. Sign up for membership at some level of participation, club sends you a bill each month, pay bill. A normal database would have tables to record these monthly billings and receipts.

    I can't look at your db until later tonight. Will see what I can come up with.
    Thanks for the help! I understand what you mean and how it is a big flaw in the database, and I will try to correct it if I have time.
    I think what I have to do for the Renewal Fee field is to convert the Length of Membership (days) field into months and then multiply it by the cost per month in a query, but how to do the functions and expressions etc I have no idea.
    Cheers again,
    Elitehass

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Building queries with or without table joins and calculations in queries are basic Access functionality. Review:

    http://office.microsoft.com/en-us/ac...aspx?section=8

    http://office.microsoft.com/en-us/ac...005188023.aspx
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    elitehass is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2013
    Posts
    5
    Quote Originally Posted by June7 View Post
    Building queries with or without table joins and calculations in queries are basic Access functionality. Review:

    http://office.microsoft.com/en-us/ac...aspx?section=8

    http://office.microsoft.com/en-us/ac...005188023.aspx
    Thanks again, but you see the problem is that the Renewal Fee field is the fee the members owe on their Renewal Date. What they owe is determined by how long their membership was (Length of Membership (Days) field) multiplied by the Cost per month field. For example, if member 1 was on a Gym membership for 30 days starting 10/05/2013 then they would owe £30 on the 09/05/2013. I just don't know how to do this because the Length of Membership field is in days and if that is calculated by the cost per month the result will be wrong. This is why I need to convert the field to months.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I am not quite sure what you want to calculate. Do the members pay monthly or do they pay for their full membership all at once? In other words, do the individuals committed to a 365-day membership pay for the whole year in one shot? Since the rates are monthly I think that yes, should show months instead of days. Then join tables in query and multiply months by rate.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    Beetle is offline Unrelatable
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    Camp Swampy (Denver, CO)
    Posts
    207
    You have a few choices;


    1. Since you charge by the month, store the length of membership in months, not days.
    2. Keep the Length Of Membership as is and convert it to months in the query by dividing by 30.
    3. Store the Cost per Month as Cost per Day instead.
    4. Convert the Cost Per Month to Cost per Day in the query by dividing by 30


    As far as creating the query goes, you simply join the two tables in a single query, return the fields you need from each table, then add additional fields to perform the necessary calculations.

    BTW - I recommend you avoid calculated fields in tables (i.e. your Renewal Date field). First, the calculated results are not reliable. If the calculation is changed after data has been entered, existing records may not get updated correctly. Second, it makes your database unusable in older versions of Access (A2007 and older). Calculated fields belong in queries, not tables.

    I also recommend you avoid spaces in your field names. It causes additional work down the road because you have to bracket them in queries and code.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Membership Database tables Help
    By elitehass in forum Access
    Replies: 2
    Last Post: 02-10-2013, 07:31 PM
  2. Calculating AGE from DOB Field.
    By must90 in forum Access
    Replies: 1
    Last Post: 11-25-2012, 07:54 AM
  3. #error on field calculating value
    By burrina in forum Forms
    Replies: 20
    Last Post: 11-09-2012, 10:38 AM
  4. Replies: 2
    Last Post: 06-13-2012, 09:01 PM
  5. Calculating field from look up table
    By hmcquade in forum Forms
    Replies: 1
    Last Post: 05-20-2011, 11:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums