Access: 2 Dimensional Look-up (!)?

OK I have no idea even what to google for, so bear with me please 🙂
So I have a table, called toy, eg train-set, helicopter, doll etc.
I also have another table, called salesperson: Andy, Bob, Cody etc.
I also have a table in which I record which salesperson sells which toy. Every time a salesperson sells a toy, a row in this table should be added to contain the salesperson’s name, the toy they sold, and their commission.
Now the thing is, each salesperson gets a different commission for each toy. So to get the commission in the paragraph above, I need to get access to look up (sales-person, toy) in a two-dimensional table, and then put it in the record.
I tried doing a calculated field using DLookup(), but it doesn’t seem to work. Is DLookup only for VBA?
(I’m not scared of using VBA: I’m proficient at VBA in Excel, but I did a little test UDF in an Access VBA module, but I don’t know how to call it. If the answer to my question needs VBA, please give some guidance regarding this as well).
Thanks so much for looking! 10 PBA 🙂

Both comments and pings are currently closed.

Comments are closed.

Powered by WordPress | Designed by: free css template | Thanks to hostgator coupon and web hosting reviews