Nesting a lookup code

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

Hi All

Hope some one can help?.

We run a large DB that has to cope with different price lists from different
company's.

The way it dos this at the moment is by producing a unique code from 5
fields giving us 403000 lines of code to lookup from.

This was OK till today.........

Now two of the company's have produced 5 more price books.

What I want to know is in a macro can you make it return a value from
different column in a table like we do in excel.

Below is the way we do this in excel:.

unique code is 1004811034 this bit is not the problem to make it lookup the
correct column we have this

=IF($P$8="Y",VLOOKUP(N13,Codes!$A$1:$J$28881,6,0),IF($P$9="Y",VLOOKUP($N13,C
odes!$A$1:$J$28881,3,0),IF($P$9="Y2",VLOOKUP($N13,Codes!$A$1:$J$28881,7,0),I
F($P$9="Y3",VLOOKUP($N13,Codes!$A$1:$J$28881,8,0),VLOOKUP($N13,Codes!$A$1:$E
$28881,2,0)))))

Can I do the same in access????????.

Regards

Simon Hardstaff
 
Check out the DLookup function (in Help file). I believe it is something
that will do what you seek. Post back if you have questions.
 
Back
Top