# Thread: Calculating Membership Fee from a field in another table?

1. Registered User
Join Date
Feb 2013
Posts
3

## Unanswered: 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?! The problem really is that the cost is in months, and the length of membership is based on days, and I cant change the Length of field because the renewal date field relies on it.
These are the relevant tables and I've also attached my database (the password is "password" for any of the users):

http://i.imgur.com/DivGgOc.png
http://i.imgur.com/InpjikL.png

2. Moderator
Join Date
Jun 2005
Location
Richmond, Virginia USA
Posts
2,764
I can't open your file with 2007, but basically, if you have Cost per Month and Length of Membership in days, you have to convert from one to the other. Most people, I believe, would use the simple expediency of assuming a month to be 30 days. And then:

Either

Cost = Length of Membership * (Cost per Month/30)

or

Cost = (Length of Membership/30) * (Cost per Month)

If the Cost per Month comes from a separate Table, you'll probably have to retrieve them into the current Form using the DLookup() Function, with the Membership Opportunities as the Criteria or 3rd argument of the Function.

Linq ;0)>

3. Registered User
Join Date
Feb 2013
Posts
3
Originally Posted by Missinglinq
I can't open your file with 2007, but basically, if you have Cost per Month and Length of Membership in days, you have to convert from one to the other. Most people, I believe, would use the simple expediency of assuming a month to be 30 days. And then:

Either

Cost = Length of Membership * (Cost per Month/30)

or

Cost = (Length of Membership/30) * (Cost per Month)

If the Cost per Month comes from a separate Table, you'll probably have to retrieve them into the current Form using the DLookup() Function, with the Membership Opportunities as the Criteria or 3rd argument of the Function.

Linq ;0)>