How To Do A VLookup In Access

This post is in response to this question:

This really doesn’t need any VBA code. It just needs to be setup correctly, and it functions like the VLookup function
in Excel.

In the image, we want to change the “Unit Price” (“PUnitPrice”) value after changing the the “Product Name” (“OProductID”) in the form.

The real key to how to do this is in the way the query is designed, and then you’ll make the form’s recordsource your query.

Here is the structure of “qryOrders”

The dropdown on the form is going to be based on the foreign key

When we use the foreign key, we can “VLookup” necessary items in the main table.

Click here for the database.

Let me know if you have any questions.


Free! Subscribe To Our YouTube Channel!

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather
Tags:




 

Call Erik Now