cos
Registered User.
- Local time
- Today, 22:56
- Joined
- Jul 13, 2012
- Messages
- 81
Right.. I have a table with all of my contracts, with main items being StartDate, EndDate and Price. All of those values are used in a query to show how much the client must pay (due to inflation, the prices vary every month, and the formula is fairly complex, one being:
March2012: IIf(#01/04/2012#>[StartDate] And [StartDate]>=#01/03/2012#,[Price],IIf([StartDate]>=#01/04/2012#,0,IIf([EndDate]<#01/03/2012#,0,[Feb2012]*[0312])))
Just to show you an example…
What I need is to be able to create a sub-contract (stored in another table, and linked via ContractID), where all of the details stay the same, except the variable outcomes the main ones being StartDate, EndDate and Price. So that in my query, the result will be shown yet, all of the old values will remain. For example:
The contract states that the EndDate is 01/03/2012, with the price of 1000. A sub-contract is made to change date to 01/05/2012 (an extension of two months), with the price changed to 1200.
What needs to happen in my query is that the prices up to 01/03/2012 to stay the same, with an additional 1200 shown in April, and 1200*Inflation in May.
Any ideas on how I may do this? It’s one of the worst parts of the system :banghead:
March2012: IIf(#01/04/2012#>[StartDate] And [StartDate]>=#01/03/2012#,[Price],IIf([StartDate]>=#01/04/2012#,0,IIf([EndDate]<#01/03/2012#,0,[Feb2012]*[0312])))
Just to show you an example…
What I need is to be able to create a sub-contract (stored in another table, and linked via ContractID), where all of the details stay the same, except the variable outcomes the main ones being StartDate, EndDate and Price. So that in my query, the result will be shown yet, all of the old values will remain. For example:
The contract states that the EndDate is 01/03/2012, with the price of 1000. A sub-contract is made to change date to 01/05/2012 (an extension of two months), with the price changed to 1200.
What needs to happen in my query is that the prices up to 01/03/2012 to stay the same, with an additional 1200 shown in April, and 1200*Inflation in May.
Any ideas on how I may do this? It’s one of the worst parts of the system :banghead: