I have a MS Access 2002 form which basically provides text boxes to manipulate records in a table called
Materials. I also have another table called
MaterialCosting which has a column
MaterialID which links it to the
Materials table which also has a column
MaterialID. What I am trying to do is to add a text box to this form which reads and writes to a field of
Here are my failed attempts:
- Right click on the form, Choose properties, and in data->Record source, enter an SQL query that joins the two tables (
SELECT * FROM Materials AS M INNER JOIN MaterialCosting AS C ON C.MaterialID = M.MaterialID). Then simply put the name of the required column (
outerCarton) in the text box's control source.
- In the text box's control source, put
DLookup("[outerCarton]", "[MaterialCosting]", "MaterialCosting.MaterialID = Materials.MaterialID")
Both of these had the same result: the text box would end up with
#Name? in it and do nothing.
How can I make this work?
The form's properties The control's properties