VLOOKUP type query in Access

ngan22

Board Regular
Joined
Feb 4, 2005
Messages
69
I want to have a field auto filled based on a look up, and I don't know how to do it in Access. Maybe someone here could help.

I have a list of Product Numbers, and their corresponding Descriptions in a table.

I want to be in a form and type in the product number, and have another field auto fill in that corresponding product description.

Thanks in advance.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hi, the way to do this is to base the form on a query. The query should include the order information (assuming you are working on an order entry form or something similar) from the order table as well as the product information (including the product description) from the product table.

In your form, create a combo box that looks up the product id and description from the products table (the standard wizard should help with that), and stores the id in the relevant field in your order table. On your form, create a new field that includes the product description from the query, set the locked property to 'Yes' (or enabled to 'No'). When the user selcets a product from the combo box, the description will automatically appear in that field you created and the description cannot be changed.

HTH, Andrew :)
 
Upvote 0
I have a table named Products.
It has two fields, [Prod#] and [Prod Description].

I have a from named [Form1] and I want to type in that form the product number (say "12345") and have a combo box to the right that looks up the product number and displays its corresponding description (Say "Product VWXYZ").

I am neew to Access and relationships and things, and I have always had a more difficult time getting the results I want from access than getting what I want from excel. Is there a good walkthrough or book that will help me on my way?

Thanks
 
Upvote 0
Hi, what are you trying to do on the form? After you have selected the product, what do you want to do next? I understand that you want to show the product description, but is there anything else you want to show on the form?
Andrew :)
 
Upvote 0

Forum statistics

Threads
1,221,902
Messages
6,162,726
Members
451,782
Latest member
LizN

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top