mcgrcoAgain
Registered User.
- Local time
- Tomorrow, 04:16
- Joined
- Jan 26, 2006
- Messages
- 47
After a 5 year hiatus from ms access I find myself back using the tool in anger and struggling with something that would have been very basic back in the day
The problem I'm trying to solve for is as follows :
I have a two tables - one is cash with a term date and the other is collateral without a term date . The collateral is sorted in terms of good (1) to bad (5)
The principle is as follows . If I have two pieces of cash with different term dates I want to allocate the worse collateral to the cash with the longest term date.
So say had cash 100 with a term date of tomorrow and cash 50 and term next week. now lets say I had 50 in bad collateral and 100 in good. I would simple assign the 50 bad to 50 cash and the 100 good to the 100 cash. obviously this is simplified and you can have one piece of collateral that needs to be split.. let say 40 bad and 110 good. In this example I would allow the 40 to the 50 cash and 10 of the 110 . The issue is one record needs to be split and I dont know how to do it.
So what i do it I load the cash into a query in vba and sort it by date- latest date first - I then load the collateral into a query sorted by quality (bad to good). I then check the cash amount against the collateral amount and if its fully covered I assign the cash term to the collateral. At some point i get a collateral amount that is greater than the amount of unallocated cash so I need to split the record . its almost like a running sum loop.
Any idea or tips on how to do this>
Much appreciated for your help !
The problem I'm trying to solve for is as follows :
I have a two tables - one is cash with a term date and the other is collateral without a term date . The collateral is sorted in terms of good (1) to bad (5)
The principle is as follows . If I have two pieces of cash with different term dates I want to allocate the worse collateral to the cash with the longest term date.
So say had cash 100 with a term date of tomorrow and cash 50 and term next week. now lets say I had 50 in bad collateral and 100 in good. I would simple assign the 50 bad to 50 cash and the 100 good to the 100 cash. obviously this is simplified and you can have one piece of collateral that needs to be split.. let say 40 bad and 110 good. In this example I would allow the 40 to the 50 cash and 10 of the 110 . The issue is one record needs to be split and I dont know how to do it.
So what i do it I load the cash into a query in vba and sort it by date- latest date first - I then load the collateral into a query sorted by quality (bad to good). I then check the cash amount against the collateral amount and if its fully covered I assign the cash term to the collateral. At some point i get a collateral amount that is greater than the amount of unallocated cash so I need to split the record . its almost like a running sum loop.
Any idea or tips on how to do this>
Much appreciated for your help !