#Name? error with unbound text box

G

Guest

Hello,

I have created a form that contains information about churchmembers and
their financial status. In the form, I created an unbound text box and tried
to use the Expression builder to take the member name from the member table
and place it in the text box.

For example:
Member Table Summary Form
Name unbound text box contains member name
Address unbound text box contains info from
other tables
City
State
Zip

I know that I could use the form design wizard to link the form to the table
however I need to input information into the form from other tables as well.
That is why I am using an unbound text box.

Here is my problem:
I create the text box, go to the expression builder and input the following:
=[Church Members]!FirstName

The above expression gives me the following error: #Name?

What am I doing wrong. Please walk me step-by-step since I am not an expert
with Access and the Expression Builder.
Thanks
 
A

Allen Browne

Use DLookup() to get the field value from the table.

Assuming the form has a MemberID (number) field, the Control Source of your
text box would be something like this:
=DLookup("FirstName], "[Member Table]", "[MemberID] = " &
Nz([MemberID],0))

For an explanation, see:
Getting a value from a table: DLookup()
at:
http://allenbrowne.com/casu-07.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top