Lookup Values

G

Guest

I have a combo box (items) on my subform which is using values from the Item
column of the following table (Stock). However, I want it to lookup the
corresponding Unit Price values (when I select an item from the combo box)
and display it in the unit price field on my subform. How do I achieve this?
Stock
Item Quantity Unit Price
Computer 9 2000000
Handbag 50 150000
Jean 20 200000
Jumpdrive 5 500000
 
A

Allen Browne

Use DLookup(). There is an example in the Northwind sample database.

Open Northwind.
Open the Order Details subform.
Look at the AfterUpdate event procedure for the ProductID combo.

If you need an explanation of how use supply the correct things for
DLookup() see:
Getting a value from a table: DLookup()
at:
http://members.iinet.net.au/~allenbrowne/casu-07.html

BTW, does a Jumpdrive allow your computer to go to warp speed? :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top