G
Guest
I have two tables; the first table is the one I want to gather information
for, pulling from the second table.
I want to lookup in table 2 the closest match without going over and gather
the cost.
Examples
PCN CD15 w APM 1400 would equal 0.02376
PCN CD15 w APM 6000 would equal 0.025512
PCN CD20 w APM 6000 would equal 0.019239
Is this possible using a DLookup or DMin or DMax in an Access Query?
Table One
PCN APM
CD15 1400
CD15 1500
CD15 6000
CD15 1200
CD20 1500
CD20 6000
Table Two
Model Vol ServCost
CD15 1000 0.02376
CD15 3000 0.02266
CD15 5000 0.025512
CD15 8000 0.0209231
CD15 10000 0.0203269
CD15 12500 0.0197615
CD15 15000 0.0192258
CD15 17500 0.0183095
CD15 20000 0.017545
CM20 1000 0.02327919
CM20 3000 0.0211629
CM20 5000 0.019239
CM20 8000 0.01749
CM20 10000 0.0159
CM20 12500 0.0159
CM20 15000 0.0159
CM20 17500 0.0159
CM20 20000 0.0159
for, pulling from the second table.
I want to lookup in table 2 the closest match without going over and gather
the cost.
Examples
PCN CD15 w APM 1400 would equal 0.02376
PCN CD15 w APM 6000 would equal 0.025512
PCN CD20 w APM 6000 would equal 0.019239
Is this possible using a DLookup or DMin or DMax in an Access Query?
Table One
PCN APM
CD15 1400
CD15 1500
CD15 6000
CD15 1200
CD20 1500
CD20 6000
Table Two
Model Vol ServCost
CD15 1000 0.02376
CD15 3000 0.02266
CD15 5000 0.025512
CD15 8000 0.0209231
CD15 10000 0.0203269
CD15 12500 0.0197615
CD15 15000 0.0192258
CD15 17500 0.0183095
CD15 20000 0.017545
CM20 1000 0.02327919
CM20 3000 0.0211629
CM20 5000 0.019239
CM20 8000 0.01749
CM20 10000 0.0159
CM20 12500 0.0159
CM20 15000 0.0159
CM20 17500 0.0159
CM20 20000 0.0159