Hello,
I am hoping someone can help me.
I have recently just started using access and am trying a few ideas out that have previously been done in excel etc.
So heres my problem / question....
Apologies for the long description. I want to ensure that everyone understands what im trying to achieve.
I have 4 tables:
tblStatic
This has many fields, however, the ones we are interested in this example are:
The unique keys are a combination of Fund and Sedol
- Fund
- Sedol
- Price Type
tblPriceTypeMapping
This table has two fields:
- Price Type (Price Type 1, Price Type 2, Price Type 3 etc etc)
- Source Table (either tbl Universe or tblGlobal)
tblUniverse
So here comes the problem.
This table has Fund and Sedol along with numerous Price Types. The price Types are fields in this table.
For Example I will have Fields:
etc etc
- Fund
- Sedol
- Price Type 1
- Price Type 2
- Price Type 3
tblGlobal
This is similar to tblUniverse, however, just includes different price types.
etc etc
- Fund
- Sedol
- Price Type 4
- Price Type 5
I basically want to write a query that uses the Static Data table and returns the relevant price, based on the price type, fund and sedol.
The Price Type mapping table tells me what table to retrieve the price from (tblGlobal or tblUniverse) and the Price Type would then be a field header within that specific table.
So using example data.....
tblStatic
Record 1 Fund = BM01
Record 1 Sedol = 0101010
Record 1 Price Type = Price Type 2
tblPriceTypeMapping
Price Type 2 = tblGlobal
tblGlobal
Fund BM01 and Sedol 0101010 has a price of 1.5 in Price Type 2
Does anyone have any suggestions on how I would achieve this and if it is even possible?
Thanks
McCrimmon
Access newbie![]()