accountinggeek
Technical User
I still can't figure out the problem. And MS tech support doesn't seem to have the answer either. Anyway, I modified my table to make it completely flat, so no other tables are involved. So, now I have the following table:
ID-------Value------UniqueVal-----Cost--Quantity--MarketVal
1--------Cost-------Cost1---------100----1000-----2000
1--------Quantity---Quantity1-----100----1000-----2000
1--------MarketVal--MarketVal1----100----1000-----2000
2--------Cost-------Cost2---------200----1750-----2200
2--------Quantity---Quantity2-----200----1750-----2200
2--------MarketVal--MarketVal2----200----1750-----2200
I created a unique field (UniqueVal) via concatenation of ID&Value.I then perform dlookup(Value,"table Name",UniqueVal)
I also have tried: dlookup(Value,"table Name",ID&Val = UniqueVal)
In either case, my query returns(ReturnVal is the val from dlookup):
ID-------ReturnVal-UniqueVal-----Cost--Quantity--MarketVal
1--------100--------Cost1---------100----1000-----2000
1--------1000-------Quantity1-----100----1000-----2000
1--------2000-------MarketVal1----100----1000-----2000
2--------100--------Cost2---------200----1750-----2200
2--------1000-------Quantity2-----200----1750-----2200
2--------2000-------MarketVal2----200----1750-----2200
It repeats this for all records. What I am expecting is:
ID-------ReturnVal-UniqueVal-----Cost--Quantity--MarketVal
1--------100--------Cost1---------100----1000-----2000
1--------1000-------Quantity1-----100----1000-----2000
1--------2000-------MarketVal1----100----1000-----2000
2--------200--------Cost2---------200----1750-----2200
2--------1750-------Quantity2-----200----1750-----2200
2--------2200-------MarketVal2----200----1750-----2200
HELP!
ID-------Value------UniqueVal-----Cost--Quantity--MarketVal
1--------Cost-------Cost1---------100----1000-----2000
1--------Quantity---Quantity1-----100----1000-----2000
1--------MarketVal--MarketVal1----100----1000-----2000
2--------Cost-------Cost2---------200----1750-----2200
2--------Quantity---Quantity2-----200----1750-----2200
2--------MarketVal--MarketVal2----200----1750-----2200
I created a unique field (UniqueVal) via concatenation of ID&Value.I then perform dlookup(Value,"table Name",UniqueVal)
I also have tried: dlookup(Value,"table Name",ID&Val = UniqueVal)
In either case, my query returns(ReturnVal is the val from dlookup):
ID-------ReturnVal-UniqueVal-----Cost--Quantity--MarketVal
1--------100--------Cost1---------100----1000-----2000
1--------1000-------Quantity1-----100----1000-----2000
1--------2000-------MarketVal1----100----1000-----2000
2--------100--------Cost2---------200----1750-----2200
2--------1000-------Quantity2-----200----1750-----2200
2--------2000-------MarketVal2----200----1750-----2200
It repeats this for all records. What I am expecting is:
ID-------ReturnVal-UniqueVal-----Cost--Quantity--MarketVal
1--------100--------Cost1---------100----1000-----2000
1--------1000-------Quantity1-----100----1000-----2000
1--------2000-------MarketVal1----100----1000-----2000
2--------200--------Cost2---------200----1750-----2200
2--------1750-------Quantity2-----200----1750-----2200
2--------2200-------MarketVal2----200----1750-----2200
HELP!