vlookup in Subform

dnjtdjq

New Member
Joined
Jan 30, 2017
Messages
7
I'm a beginner in Access and I'm not sure if what I want to do is correct or possible to do in Access but I will give it a go.

Im trying to make a recipe template using Access Form and I have three tables I first made.

Combined Table, Ingredients Table and Recipe Table.

In Ingredients Table, I have 3 fields which are Ingredients ID, Ingredient and price.

In Combined Table, I have Recipe ID, Ingredients, Price, Amount and Total

When I made a Form, I have put Recipe Table as a main form and Combined table as a subform.

Then, in subform I have deleted Recipe ID.

What I want to do is the price field in subform to be auotmatically fileld if when I type Ingredients in subform ingredients field.

The dlookup formula I used in the control source of a combo box is =DLookUp("Price","Ingredients Table","Ingredient=" & [Ingredient Combo])

And no matter how I change the formula, the end result is #ERROR.

Any suggestions will be highly appreciated.
Thank you
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Cross-posted here: Using Dlookup in Subform

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule #13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0

Forum statistics

Threads
1,215,356
Messages
6,124,475
Members
449,164
Latest member
Monchichi

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