If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Lookup Values
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 |
#2
|
|||
|
|||
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? :-) -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Wantula" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Summing LOOKUP values | mpjohnston | General Discussion | 3 | August 28th, 2004 09:32 PM |
Please help! How can I use Lookup() command if values are not in ascending order? | rruzicka | Worksheet Functions | 4 | August 23rd, 2004 06:55 PM |
VLOOKUP lookup values as range | Andy Brown | Worksheet Functions | 2 | March 29th, 2004 12:25 AM |
lookup a sum of multiple values for a single date | Mic | Worksheet Functions | 2 | October 22nd, 2003 05:52 PM |