I decided there's a flaw in my table design after several days of inability in solving a problem with the "residue" field in one of my tables.
I have the following situation:
Some customers have prescriptions which come - for those eligible -, each month, in various worths. They give these prescriptions to the shop and use them over time to buy what they need.
Hence the need of a "Residue" field: when customers return we are immediately able to tell them how much they have left on their prescriptions.
So far the residue has been calculated with spreadsheets, but I'm trying to implement this feature in the access database I'm working on, but I'm at an impasse and have failed so far.
Is it because of a flawed design?
I have the following situation:
- tblCustomers
pkCustID
[other fields..]
- tblOrders
pkOrderID
fkCustID
[other fields..]
- tblCustPrescriptions
pkCustPresID
fkCustID
PresWorth[Currency]
PresResidue[Currency]
- tblPayments
pkPaymentID
fkCustID
fkOrderID
fkCustPresID
Amount[Currency]
Due[Currency]
Some customers have prescriptions which come - for those eligible -, each month, in various worths. They give these prescriptions to the shop and use them over time to buy what they need.
Hence the need of a "Residue" field: when customers return we are immediately able to tell them how much they have left on their prescriptions.
So far the residue has been calculated with spreadsheets, but I'm trying to implement this feature in the access database I'm working on, but I'm at an impasse and have failed so far.
Is it because of a flawed design?