Jump to content

To show the right data on a giving date


Achineche
 Share

This topic is 4353 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Anyone could help me on this?

I have two tables, payments and people. They are related through PeopleID.

People must pay a monthly fee.

I have a field (PaymentSituation) in Peoples table that through a calc tells me if a person owes money or not.

What I need to accomplish is to know the right data on a giving date.

For example: if a person didn’t pay on January but now has fully paid, the paymentsituation tells me that doesn’t owe anything, even if I take a look to January.

I don't know if I can't make myself understood :lol:

How should I relate the tables to show the right data on any giving date?

Thank you very much.

Link to comment
Share on other sites

- Payments table:

·TotalAmountByPeople

- People table:

·AmountOwed

·PaymentSituation: case ( people::AmountOwed - Payments::TotalAmountByPeople < 0 ; "Not fully paid" ; people::AmountOwed - Payments::TotalAmountByPeople >= 0 ; "Fully paid" )

Link to comment
Share on other sites

Well, that doesn't tell me how People::AmountOwed is figured out.

I think that if you define another relationship between the two tables as:

People::PeopleID = Payments 2::PeopleID

AND

People::gDate ≥ Payments 2::PaymentDate

you will be able to make the assessment at the given gDate - provided you know how to calculate the amount owed at the same time.

Link to comment
Share on other sites

The amount owed it's a monthly fee, calculated in another table, how silly!, I didn't think of that, I was trying to make it simple to explain, sorry about that.

Should I make another relationship with the MonthlyFee table?

People::PeopleID = MonthlyFee 2::PeopleID

AND

People::gDate ≥ MonthlyFee 2::Month

Link to comment
Share on other sites

This topic is 4353 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.