#Name? being returned for form field

J

J_70

I have a form field which returns a value from a table. The reference is :
=Training_Course!TuitionCost
which is displayed as #Name?. What does this mean>
 
K

kingston via AccessMonster.com

It means that Access doesn't understand Training_Course!TuitionCost. Do you
mean:

Forms!Training_Course!TuitionCost
 
J

J_70

Not sure but the reference is to the table Training_Course which contains the
field TuitionCost. The problem is that this field is pulling from a different
table than the rest of the form. I believe I need to create a join; how do I
put the result of a query into a form field?
 
K

Klatuu

You can't just refer to a table and field name and get any results. The
first question would be, even it that worked, how does it know which record
to return the value from? Assuming you can tell the DLookup function what
record to look for to get the value, it would be the way to go:
=DLookup("[TuitionCost]", "Traning_Course", ???)

The ??? would be the criteria that matches the record in the Training_Course
table to some control on your form or a function that can determine the value
to use for the Lookup criteria.
 
K

kingston via AccessMonster.com

It sounds like you need to make a query that links the datasets. What is
your form based on right now? If it's based on 1 table and you need data
from another table, create a query with both tables. Hopefully, there is a
way to join the two tables (look for common keys, IDs, and fields); otherwise,
you'll need to create a way to link the data. Then, your form should be
based on the query, not the table.

J_70 said:
Not sure but the reference is to the table Training_Course which contains the
field TuitionCost. The problem is that this field is pulling from a different
table than the rest of the form. I believe I need to create a join; how do I
put the result of a query into a form field?
It means that Access doesn't understand Training_Course!TuitionCost. Do you
mean:
[quoted text clipped - 4 lines]
 
Top