If I have multiple vendors for items in stock and I have a junction table with that info, how would I go about selecting the vendor with the lowest price? Would that happen in the query with a dlookup? or is there an easier way to do this?
Reply from Richard Rost:
You can use a DMIN to find the lowest price, then DLOOKUP to get the rest of the info
Now that you have the lowest price, just DLOOKUP the product ID and from that you can get the vendor ID. Of course, if two vendors have identical prices you'll get one at random. I suppose you could specify a priority order for vendors and then sort based on that. :)
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Microsoft Access 328.