kbrooks
Still learning
- Local time
- Today, 16:43
- Joined
- May 15, 2001
- Messages
- 202
I have a database with some calculated fields that is really confusing me. I posted about it earlier and got some responses telling me that I don't want to store the calculated total, just the calculations themselves. I haven't worked with it since then and now that I'm getting back to it, I'm confused.
Here are the fields that will either need calculated or will be needed for the calculations:
1. total_charges (keyed in manually)
2. third_party_payments (keyed in manually)
3. percentage (keyed in manually)
4. patient_payment (keyed in manually)
5. adjusted_balance (calculated)
=total_charges - third_party_payments -
patient-payment
6. fap_payment (calculated)
=adjusted_balance * percentage / 100
7. patient_balance (calculated)
=total_charges - adjusted_balance
What I did so far is to set up a query that makes a new table. It is performing the calculations for the adjusted_balance field but not the last 2. Is it possible to run a calculation on a field that doesn't exist before the query is run? Meaning, if I'm creating the field adjusted_balance from calculations during this query, can I perfom other calculations from adjusted_balance? Or do I create it and then run another query??
I'd like to perform all these calculations with one step but I'm not sure it's possible. Ideally I want the calculations to be performed (or at least displayed) on a form as the user is entering the other data used to calculate the totals.
Does this make sense? I hope someone can help me because I'm confusing myself!! Thanks in advance!
Here are the fields that will either need calculated or will be needed for the calculations:
1. total_charges (keyed in manually)
2. third_party_payments (keyed in manually)
3. percentage (keyed in manually)
4. patient_payment (keyed in manually)
5. adjusted_balance (calculated)
=total_charges - third_party_payments -
patient-payment
6. fap_payment (calculated)
=adjusted_balance * percentage / 100
7. patient_balance (calculated)
=total_charges - adjusted_balance
What I did so far is to set up a query that makes a new table. It is performing the calculations for the adjusted_balance field but not the last 2. Is it possible to run a calculation on a field that doesn't exist before the query is run? Meaning, if I'm creating the field adjusted_balance from calculations during this query, can I perfom other calculations from adjusted_balance? Or do I create it and then run another query??
I'd like to perform all these calculations with one step but I'm not sure it's possible. Ideally I want the calculations to be performed (or at least displayed) on a form as the user is entering the other data used to calculate the totals.
Does this make sense? I hope someone can help me because I'm confusing myself!! Thanks in advance!